From 469bff5734e6bcd531c6602e3c7208b409b2d905 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 9 Jan 2017 19:38:48 +0100 Subject: [PATCH] Make call delegate weak // FREEBIE --- Signal/src/call/SignalCall.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Signal/src/call/SignalCall.swift b/Signal/src/call/SignalCall.swift index 7b4b5f59b..3efa8f10b 100644 --- a/Signal/src/call/SignalCall.swift +++ b/Signal/src/call/SignalCall.swift @@ -16,7 +16,7 @@ enum CallState: String { case remoteBusy // terminal } -protocol CallDelegate { +protocol CallDelegate: class { func stateDidChange(call: SignalCall, state: CallState) func muteDidChange(call: SignalCall, isMuted: Bool) } @@ -28,7 +28,7 @@ protocol CallDelegate { let TAG = "[SignalCall]" - var delegate: CallDelegate? + weak var delegate: CallDelegate? let remotePhoneNumber: String // Signal Service identifier for this Call. Used to coordinate the call across remote clients.