Bug Tracker

Opened 14 years ago

Closed 14 years ago

#4447 closed bug (invalid)

Creating an element leaks memory in ie7

Reported by: jwagener Owned by: brandon
Priority: major Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc: [email protected]
Blocked by: Blocking:


when i run the appended html file in ie7, the browser reserves about ~150mb. when running the page without executing the jQuery("<div...) memory usage goes back to ~75mb. (note the div is not appended to the document or referenced in any way).

in firefox memory usage spikes a little bit when loading the page but goes back to a normal level.

<html> <head> <script src="http://code.jquery.com/jquery-latest.pack.js"></script> </head> <body> <script> jQuery(document).ready(function(){ for(var i =0; i<10000; i++){


} }); </script> <div id="debug"> </div> </body> </html>

Change History (4)

comment:1 Changed 14 years ago by brandon

Owner: set to brandon

comment:2 Changed 14 years ago by brandon

Resolution: fixed
Status: newclosed

this is fixed in r6310

comment:3 Changed 14 years ago by brandon

Resolution: fixed
Status: closedreopened

Sorry, meant to close out #4563.

comment:4 Changed 14 years ago by brandon

Resolution: invalid
Status: reopenedclosed

Since I stumbled upon this bug let me respond to it properly. :)

I'm not sure what you expect jQuery to do here. You've created new elements but haven't done anything with them. They are in limbo in IE and the IE GC can't get to them. You need to do something with them... either append them to the DOM or null them out when you are done with them.

Note: See TracTickets for help on using tickets.