diff --git a/Signal/src/call/PeerConnectionClient.swift b/Signal/src/call/PeerConnectionClient.swift index 4bbfad382..b7b28f798 100644 --- a/Signal/src/call/PeerConnectionClient.swift +++ b/Signal/src/call/PeerConnectionClient.swift @@ -244,6 +244,9 @@ class PeerConnectionClient: NSObject, RTCPeerConnectionDelegate, RTCDataChannelD private var cameraConstraints: RTCMediaConstraints private let proxy = PeerConnectionProxy() + // Note that we're deliberately leaking proxy instances using this + // collection to avoid EXC_BAD_ACCESS. Calls are rare and the proxy + // is tiny (a single property), so it's better to leak and be safe. private static var expiredProxies = [PeerConnectionProxy]() init(iceServers: [RTCIceServer], delegate: PeerConnectionClientDelegate, callDirection: CallDirection, useTurnOnly: Bool) {