There is currently a 5-node retain cycle when Wormholy is presented, primarily because URLSession has a strong delegate reference to CustomHTTPProtocol, which in turn has a strong reference back to the URLSession.
Break the chain when stopLoading() is called, by invalidating the URLSession and so it breaks its strong delegate reference.
There is currently a 5-node retain cycle when Wormholy is presented, primarily because
URLSession
has a strong delegate reference toCustomHTTPProtocol
, which in turn has a strong reference back to theURLSession
.Break the chain when
stopLoading()
is called, by invalidating theURLSession
and so it breaks its strong delegate reference.