nextcloud / talk-ios

📱😀 Video & audio calls through Nextcloud on iOS
GNU General Public License v3.0
147 stars 87 forks source link

Fix NCCallController retain cycle #1634

Closed SystemKeeper closed 3 months ago

SystemKeeper commented 4 months ago

Fixes #1627 Fixes #1467

When a call is ended, we remove the observer from the darwin notification center, but since the handler is still stored in the array, we retain the NCCallController. Since the starting/stopping of broadcasting is systemwide, all NCCallControllers will try to handle it and create publishers. An alternative would be to use a weakself in the handler itself, but this should be more failsafe

SystemKeeper commented 3 months ago

I am unable to reproduce #1467 with this PR anymore. So I guess it had the same root cause.