Skip to content

Memory leak due to window event listeners not being removed #1122

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

Open
johnkeisuke opened this issue May 24, 2018 · 0 comments · May be fixed by #1123
Open

Memory leak due to window event listeners not being removed #1122

johnkeisuke opened this issue May 24, 2018 · 0 comments · May be fixed by #1123

Comments

@johnkeisuke
Copy link

johnkeisuke commented May 24, 2018

I'm creating a SPA and eventually the browser went out of memory in a section when jsGrid tables were created and removed constantly according to an Ajax call.

I'm not an JQuery expert, I found out that removing the target div of the jsGrid table does not remove any window event listener. Maybe this is expected behaviour that cannot be handled.

Then, I called jsGrid('destroy') before removing the div and it removed all the resize listeners (even the listeners of all the others jsGrid tables already created), but none of the load ones.

Here is a jsfiddle: http://jsfiddle.net/johnkeisuke/1sx3dcdj/

It was tricky to find the issue I hope it helps more people in the same situation :)

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 a pull request may close this issue.

1 participant