Skip to content

Event listeners added to window removed on destroy#1123

Open
johnkeisuke wants to merge 1 commit intotabalinas:masterfrom
johnkeisuke:master
Open

Event listeners added to window removed on destroy#1123
johnkeisuke wants to merge 1 commit intotabalinas:masterfrom
johnkeisuke:master

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