Novemberborn, Straight lines circle sometime

Memory Leaks: Gone!

At Xopus we develop a pretty big (~50k lines) JavaScript application to edit XML documents through a WYSIWYG interface. With such a large application there’s a large risk of memory leaks. Indeed, this is what we’ve been experiencing in Internet Explorer 6. We’ve also seen a decrease in performance as memory usage increased. These leaks, however, do not occur in Internet Explorer 7. And, as of just 10 days ago, they no longer occur in IE6 on Windows XP.

On June 12th, Microsoft released security update MS07-033. Included in this update is the following:

General distribution release (GDR) fixes
A memory leak occurs in Internet Explorer 6 when you view a Web page that uses JScript scripting on a Windows XP-based computer (KB929874)

And indeed, IE 6 on Windows XP no longer leaks memory, nor performance. This is great news for all JavaScript hackers, there’s no need to worry about memory leaks anymore!

The one cave-at is that this fix is only available for Windows XP. For Xopus this means we’ll still have to fix the leaks, since some of our clients are still running Windows 2000. Users who haven’t installed the latest security updates will also experience memory leaks in IE 6. In the end though, Microsoft fixed the memory leak issues in Internet Explorer, and I’m thankful for that.

link | javascript | 22 June 2007, 16:06


Comments

  1. hurray!

    ed | 22 June 2007, 20:26 | link

  2. They only way to detect a patched version of IE6 on XP is to look for “SV1” in the userAgent string. Even then you can’t be sure you have the latest patch. This is still good news though. :-)

    Dean Edwards | 24 June 2007, 21:21 | link

  3. That sound great! Let’s just hope that no new bugs pop up ….

    Kevinin | 25 June 2007, 12:45 | link

  4. Yeah, this really doesn’t change anything for developers.

    This is great for those 5 IE6 users on XPSP2 that regularly update but have manually NOT updated to IE7 (it’s a forced upgrade you’ll remember).

    Unfortunately, we really can’t give up patching our memory leaks.

    Actually, this could be really really bad for developers. If you setup a testing box with IE6 to test your app and you accidentally get the latest patched version, you’ll be blissfully unaware of all the memory leaks that your site has for the majority of IE6 users. Awesome!

    Thomas Aylott | 26 June 2007, 14:33 | link

  5. Does this fix work with Windows Server 2003?

    Nicu | 27 June 2007, 09:06 | link

  6. No it’s just Windows XP I’m afraid.

    Mark Wubben | 27 June 2007, 10:36 | link

  7. I can see Thomas’ point, but still, Microsoft fixing bugs must be a good thing, surly!

    patrick | 27 June 2007, 17:34 | link

  8. All XP users who keep their software updated will get this patch. Those who don’t will likely have other issues with their machine, browsers leaking memory won’t be causing it to run slower.

    Mark Wubben | 27 June 2007, 18:54 | link

  9. To be honest i cant see any diff since this patch, the only thing I’ve find out is that IE releases the leaked memory when minimized. So what can I say to my users, minimize IE window every 4 hours?

    Michal | 13 July 2007, 10:33 | link

  10. I’m definitely experiencing memory leaks in IE7 that releases substantially when I minimize IE. I don’t know how to fix it. I don’t remember it always doing this. :(

    Alocasia | 25 July 2007, 05:58 | link

  11. Yes same as above, having memory leaks that are released when refreshed.

    It gets to the point with alot of tabs etc open that i actually loose Copy & Paste, but regain it if i minimise or close a tab to release some memory.

    Slightly annoying. Anyone else loosing Copy & Paste ability at times?

    Taree Internet | 27 July 2007, 17:32 | link

  12. Does this fix apply for IE7 as well? I installed all automatic updates but the leak still occurs. Then I spent one hour trying to search the pathetic update sites and documentation that m$ put together, hoping to manually identify and download the patch, but I couldn’t find one…

    Does this mean that IE7 users are out of luck?

    Mihai Bazon | 9 October 2007, 13:48 | link

  13. The fix described in this post is in fact a clean-up method which clears leaks from nodes still attached to the document when a page is unloaded. So leak patterns are still possible.

    Mark Wubben | 9 October 2007, 18:14 | link

  14. I think it’s pretty good news, even if it’s really hard to control, memory leaks should not be in such important softwares like IE. The software we used at my last job was relying on IE and we had to reboot a pretty important computer 3-4 times a week because of these leaks.

    Jeff Waren | 16 November 2007, 04:38 | link

  15. I’ll agree with a poster a few above me. I have been losing copy and paste ability as well. Nice to know I’m not alone… I guess. When I have too many tbs open, it gets bad. Sometimes 10 is too many. Sometimes just 5 or 6. Very strange indeed.

    George T. | 20 February 2008, 05:52 | link

  16. Glad to hear there are no more memory leaks in IE6, because I had some serious problems with that in the past.

    Marc Hernandez | 23 February 2008, 21:08 | link

  17. Currently, if i open a lot of browser about 10-15, i will lose the ability to copy and paste. Few times, i got my pc automatically shutdown due to memory leak.

    James Burt | 27 February 2008, 15:50 | link


Novemberborn: Extra

About the author

Mark Wubben is a hacker/writer in Enschede, the Netherlands.

Read more about Mark...

Go to

Jobs (NL)

Xopus zoekt programmeurs! Verbeter de code en win!

Subscribe