Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The OP never mentions removing the node from the DOM.


It's kind of implied, isn't it? I mean, it wouldn't make sense to expect something that's still part of the DOM tree to get garbage collected, would it? Unless I'm missing something?


You're right. My initial reading was the closure closed over extra objects (which would be a leak so long as the DOM node is live), but I think the OP is worried about the DOM node leaking.


It was an assumption I made in my reply (now corrected) but it doesn't matter; even without removing the node from the DOM there's a memory leak in IE4-6, one that persists until the browser is terminated.

In the other cases, there's no memory leak while the DOM node still exists, because the DOM still has a reference to it so it shouldn't be garbage collected.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: