RSS 2.0
Sign In
# Sunday, February 10, 2013

In our applications we must support IE 8, and unfortunately we hit some leak, which is registered as Ticket #7054(closed bug: fixed).

While bug declared closed as fixed we can see that memory leak in IE8 like a mad. Not sure if something can be done about it.

The test case is:

<!DOCTYPE html>
  <script src="scripts/jquery/jquery-1.9.0.js"></script>
function testLeak()
  var handler = function () { };

  $('<div></div>').html(new Array(1000).join(new Array(1000).join('x'))).bind('abc', handler).appendTo('#test').remove();

$(function() { setInterval(testLeak, 1000); });
<div id="test"></div>

Update: jaubourg has pointed that we have missed to define element with id="test". With this element leak stops.

Sunday, February 10, 2013 5:17:33 AM UTC  #    Comments [2] -
Monday, February 11, 2013 12:35:07 PM UTC
Wouldn't the problem be that there is no element with id "test" so remove wouldn't do a thing (since you appended to *nothing*)?
Monday, February 11, 2013 1:18:47 PM UTC
Ah, you're right!
When we added div with id it has stopped to leak.

Thank you!
All comments require the approval of the site owner before being displayed.
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview
<February 2013>
Total Posts: 387
This Year: 3
This Month: 0
This Week: 0
Comments: 1060
Locations of visitors to this page
The opinions expressed herein are our own personal opinions and do not represent our employer's view in anyway.

© 2024, Nesterovsky bros
All Content © 2024, Nesterovsky bros
DasBlog theme 'Business' created by Christoph De Baene (delarou)