Side navigation
#4447 closed bug (invalid)
Opened March 30, 2009 03:01AM UTC
Closed April 21, 2009 07:29PM UTC
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: | jw@n31.de | |
Blocked by: | Blocking: |
Description
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++){
jQuery("<div></div>");
}
});
</script>
<div id="debug">
</div>
</body>
</html>
Attachments (0)
Change History (4)
Changed April 21, 2009 06:53PM UTC by comment:1
owner: | → brandon |
---|
Changed April 21, 2009 06:53PM UTC by comment:2
resolution: | → fixed |
---|---|
status: | new → closed |
this is fixed in r6310
Changed April 21, 2009 06:54PM UTC by comment:3
resolution: | fixed |
---|---|
status: | closed → reopened |
Sorry, meant to close out #4563.
Changed April 21, 2009 07:29PM UTC by comment:4
resolution: | → invalid |
---|---|
status: | reopened → closed |
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.