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

IE in-page memory leak when using removeChild #2225

Closed
ibolmo opened this Issue Jan 19, 2012 · 2 comments

Comments

Projects
None yet
4 participants
@ibolmo
Copy link
Member

ibolmo commented Jan 19, 2012

(from Lighthouse)

http://jsbin.com/elaju4

When you use removeChild to get rid of an element in IE, its memory isn't actually swept up until the page refreshes. For long running pages (e.g. HUE) this is a big deal.

@arian

This comment has been minimized.

Copy link
Member

arian commented Jan 19, 2012

@kentaromiura

This comment has been minimized.

Copy link
Member

kentaromiura commented Apr 13, 2012

that's because removeChild doesn't eliminate the node but just remove the child from the element and return it, if you want to really get rid of it just call .destroy() on the result of removeChild.

tested using the same setup used on #2351 and
while sIEve tells me that using removeChild() will leak about 1000 elements
using removeChild().destroy() will drop the leaks from 1000 to 0.

@fakedarren fakedarren closed this Jul 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment