sjrmanning / Birdsong

:bird::musical_score: Swift WebSockets client for Phoenix Channels.
MIT License
127 stars 37 forks source link

[MemoryLeak] Presence callbacks now deallocated after leaving the channel #17

Closed Daltron closed 7 years ago

Daltron commented 7 years ago

Currently, if you do anything inside these methods that pertain to the class that it's in such as calling a delegate, calling another function, etc.. it will cause a retain cycle. Setting these to nil after leaving the channel breaks this retain cycle

sjrmanning commented 7 years ago

Good call! Thanks for this. I'm going to include this and the fix for #16 in 0.5.2 which I'll publish to CocoaPods asap :)