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

Memory issue when deleting #270

Closed
Vezul opened this issue Nov 7, 2015 · 1 comment
Closed

Memory issue when deleting #270

Vezul opened this issue Nov 7, 2015 · 1 comment

Comments

@Vezul
Copy link
Contributor

Vezul commented Nov 7, 2015

When using the destroy method, like explained in the documentation:

autosize.destroy(document.querySelectorAll('textarea'));

The clean up code at https://github.com/jackmoore/autosize/blob/master/src/autosize.js#L126-L135 does not cleanup the event listener for autosize:update. Which causes leaking of listeners.

@Vezul
Copy link
Contributor Author

Vezul commented Nov 7, 2015

Simply the following line should be added:

ta.removeEventListener('autosize:update', update);

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