-
Notifications
You must be signed in to change notification settings - Fork 146
Description
My application joins and leaves different channels depending on where the user is in the application.
During some profiling tests I noticed some leaked objects, that appeared to be generated following calls to channel.leave(). Originally I assumed it was my code but in the end I managed to find the following in the memory debugger which seems to indicate an orphaned channel, several closure contexts, and cyclic references to PhxTimer and Push. Essentially the channel is never deallocated and however many channels the application joins they always persist in memory.
I have managed to solve the issue with the following changes Lankester@0c5c263 but despite the tests passing I am not sure it is the best way.
If it turns out to be a reasonable solution, I'd be happy to submit a PR.
