client-sdk-swift
client-sdk-swift copied to clipboard
Fix memory leaks in AppStateListener and Room
Fix: memory leaks in AppStateListener observers and Room cleanup
AppStateListener:
- Store NotificationCenter observer tokens for proper cleanup
- Add deinit to remove all observers
- Use [weak self] in all observer closures
Room:
- Remove from AppStateListener.delegates in deinit (safety net)
- Explicitly remove in cleanUp() (primary path)
- Prevent memory leaks when Room is destroyed without cleanUp()
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.