Side navigation
#7842 closed bug (invalid)
Opened December 25, 2010 03:25AM UTC
Closed January 08, 2011 08:07AM UTC
Mmeory leak in support code
Reported by: | chancharles | Owned by: | chancharles |
---|---|---|---|
Priority: | undecided | Milestone: | 1.6 |
Component: | unfiled | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The following code will cause the "div" to leak in IE8:
if ( div.attachEvent && div.fireEvent ) { div.attachEvent("onclick", function click() { // Cloning a node shouldn't copy over any // bound event handlers (IE does this) jQuery.support.noCloneEvent = false; div.detachEvent("onclick", click); }); div.cloneNode(true).fireEvent("onclick"); } div = document.createElement("div");
To fix this problem, we can add:
div.outerHTML = '';
before the div assignment:
div.outerHTML = ''; div = document.createElement("div");
This is IE specific.
Attachments (0)
Change History (3)
Changed December 25, 2010 03:32AM UTC by comment:1
Changed December 25, 2010 03:53AM UTC by comment:2
owner: | → chancharles |
---|---|
status: | new → pending |
Thanks for taking the time to contribute to the jQuery project!
Is there any way that you can show evidence of this memory leak?
Changed January 08, 2011 08:07AM UTC by comment:3
resolution: | → invalid |
---|---|
status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
The following "null" assignments will also cause memory leak in IE8:
We can change them to: