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 added to window removed on destroy #1123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnkeisuke
Copy link

@johnkeisuke johnkeisuke commented May 24, 2018

Fixes #1122

I added a unique ID to each table created to be able to detach its listeners easily. The IDs are recycable in order to not increment endlessly the value last ID.

@barry8schneider
Copy link

What is the use case for this change?

@johnkeisuke
Copy link
Author

Using ajax to load data from server.

In my case I was managing groups of users, displayed in tables. These groups could be deleted or created several times throughout the day and the event listeners were being accumulated. It is a small memory leak, but it is.

@srivanov
Copy link

Merge this because it's a memory leak fix.

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

Successfully merging this pull request may close these issues.

Memory leak due to window event listeners not being removed
3 participants