Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event listeners leak in 2.0.1 #545

Closed
ghost opened this issue Nov 13, 2013 · 3 comments
Closed

Event listeners leak in 2.0.1 #545

ghost opened this issue Nov 13, 2013 · 3 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Nov 13, 2013

Hello,

Here is the problem with event system in 2.0.1
http://jsfiddle.net/ga7cA/4/

You can see that 'children' event listeners are not destroyed properly after the control is destroyed and element content is removed.

There was no issue with 2.0.0

@justinbmeyer
Copy link
Contributor

Is it necessary to use the control in that example to create the memory leak?

@ghost
Copy link
Author

ghost commented Nov 14, 2013

I'm not really sure, it is more related to view rather than a control. I think the problem occurs when control element child nodes are removed multiple times. You can press the Reload button multiple times and see the result in the browser console - children array in __bindEvents will be growing.

@justinbmeyer
Copy link
Contributor

I was stupidly not binding to a "change" event and unbinding it correctly. GREAT pickup. Seriously. It would have taken a while to notice that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant