From 86e038436b1dd2d393df4e2b5d3ee7de75ba4f5d Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 29 May 2018 09:52:51 -0400 Subject: [PATCH] Fix crashes while deallocating PeerConnectionClient. --- Signal/src/call/PeerConnectionClient.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Signal/src/call/PeerConnectionClient.swift b/Signal/src/call/PeerConnectionClient.swift index 7c06a7f1f..4bbfad382 100644 --- a/Signal/src/call/PeerConnectionClient.swift +++ b/Signal/src/call/PeerConnectionClient.swift @@ -80,6 +80,13 @@ protocol PeerConnectionClientDelegate: class { // [PeerConnectionClient terminate] when it is done with a PeerConnectionClient // instance, so terminate is a reliable place where we can break the retain cycle. // +// Note that we use the proxy in two ways: +// +// * As a delegate for the peer connection and the data channel, +// safely forwarding delegate method invocations to the PCC. +// * To safely obtain references to the PCC within the PCC's +// async blocks. +// // This should be fixed in Swift 4, but it isn't. // // To test using the following scenarios: