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

fix: destroy _resizeObject to avoid potential memory leak #62

Merged
merged 1 commit into from
Apr 12, 2020

Conversation

rocka
Copy link
Contributor

@rocka rocka commented Apr 12, 2020

I'm facing some severe memory leak issues recently. After some digging, I found that RecycleScroller haven't been destroyed under certain circumastances.

delete this._resizeObject.onload

the code above can't actually remove the event listener, instead, we should assign the value to null :

And the reference to _resizeObject should also be removed, to allow GC of the entrie DOM tree, see: https://developers.google.com/web/tools/chrome-devtools/memory-problems/heap-snapshots#uncover_dom_leaks

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.

2 participants