Main Menu

  • Home
  • jQuery
  • MooTools
  • CSS
  • JavaScript
  • Ruby on Rails
The True Tribe

Search, View and Navigation

JavaScript

IE Plugin to Detect JavaScript Memory Leaks

Last Updated (Wednesday, 17 September 2008 06:27) Written by Jonah Dempcy Tuesday, 02 September 2008 00:39

Attention, open in a new window. PDFPrintE-mail

JavaScript - General

Microsoft has released a free beta version of a plugin for Internet Explorer that looks for memory leaks. The plugin, plainly titled JavaScript Memory Leak Detector (download), is available immediately and tests for both IE6 and IE7 leaks. Apparently, IE6 has far more leaks -- any time when you have a circular reference between DOM objects and JavaScript objects a leak would occur.

Why are leaks a problem? Because the RAM leaked by a page will remain in use until the browser is closed. For developers of websites with heavy JavaScript usage, memory leaks can be a nightmare. I once worked on a site that would climb to hundreds of megabytes after a few pages of data loaded in through Ajax. Then, the RAM would continue to stay in use until I closed and restarted the browser.

Excerpt from the article "JavaScript Memory Leak Detector"

The IE team has been working hard to solve the problem. With the initial versions of Internet Explorer 6 practically all circular references between Javascript and DOM objects caused a memory leak.

It seems than an update to IE6 alleviated this problem somewhat, but there are probably still many users who haven't upgraded, and even the later versions of IE6 and current versions of IE7 still have problems. Most of the problems are caused by closures, which really shouldn't be an issue, as Firefox, Opera and Safari generally handle them fine. I use closures all the time in my code so I shudder to think of what leaks lie beneath. But, I'm about to download this leak detector and give it a try. From the screenshots, it doesn't look too appealing, but I'm curious to find what it will detect on the past few sites I've made.

< Prev

Add your comment

Your name:
Your email:
Your website:
Subject:
Comment:
  The word for verification. Lowercase letters only with no spaces.
Word verification:
yvComment v.1.18.4

Additional Information

What is your job title?












Results

 © The True Tribe, 2008. Created by Jonah Dempcy and Alex Grande.    We are now accepting freelance work. Email us for rates and more information.