3 ms·
Wait, so in previous versions, when you destroy a view, event listeners weren't destroyed? I haven't noticed any issues in my Backbone app but this seems like
by mcrider 14y ago
Wait, so in previous versions, when you destroy a view, event listeners weren't destroyed? I haven't noticed any issues in my Backbone app but this seems like it could spiral into a memory issue.
- ricardobeat 14y agoYes, this is (was?) a long standing problem, they are called "zombie events". Here's a famous post on the issue: http://lostechies.com/derickbailey/2011/09/15/zombies-run-managing-page-transitions-in-backbone-apps/ http://lostechies.com/derickbailey/2011/09/15/zombies-run-ma...
- playhard 14y agoYes. The event listeners were not removed with currentView.remove(). Had to use currentView.unbind() to remove the event listeners.