JavaScript Memory Leak Detector (v2)


JavaScript Memory Leak Detector ( Download ) is a Debugging tool to detect and enforce best practices Memory leaks in JavaScript code when Working with version of Internet Explorer older than IE8.

As described in Detail in this MSDN article the JScript garbage collector in previous versions of Internet Explorer manages the lifetime of JScript objects but not of DOM objects. As a result, the JScript garbage collector can not break Circular references between DOM objects and JScript objects, and memory leaks may occur.

  • In IE6, these circular references are broken when the Internet Explorer process terminates (and leaks are very frequent).
  • In IE7, these circular references are broken when users navigate away from the page.
  • In IE8 the problem is completely mitigated. (Read here for more details).

Programmers who need to support older versions of the Internet Explorer browser should still try to pay attention to programming patterns such as JScript closures, as they could cause memory leaks.

The leak detector works hosting an IE WebBrowser control and intercepting the execution of JavaScript inside IE. It monitors al the DOM elements in the markup of a web document that somehow interact with JavaScript and presents a list of potentially leaked objects to the user, together with information about the scripts loaded in the page and, if possible, a hint to the instruction that may have caused the leak.

Installation notes

IEJSLeaksDetector is a plain, native, Windows application and does not require any particular setup (the executable can be just unzipped and run).
It only runs in 32 bit versions of Windows. 64 bits editions are not supported yet.

There are only two installation steps required to make sure that the tool works correctly:

1. The tool requires that the pdm.dll script installer is installed in the machine. This DLL is normally installed with any version of Microsoft Visual Studio.In case you are unable to install Visual Studio in the target machine, a simpler way to install Pdm.dll is by installing the Microsoft Script Debugger, freely Downloadable here .

2. The tool also requires Internet Explorer script debugging to be enabled to work correctly. Verify that the check box "Disable script debugging (Other)" is unchecked, in IE ('Tools' menu -> Internet Options -> 'Advanced' tab -> 'Browsing' section) as shown in figure.

JavaScript Memory Leak Detector (v2)

How to use the tool

The user can start the memory profiling of a web application navigating to the desired URL. A new tab is opened with a WebBrowser control and a tree view shows all the documents and scripts that compose the current page.
When the user has finished to interact with the page he can click the "Stop" button, which causes the tool to close the control and track possible leaks.
Memory leaks are listed specifying the DOM object's type and a list of "attached" JavaScript objects whose circular reference could be the cause of the leak. The tool also shows the call stack correponding to a memory leak, which represents the state of the script at the moment when the JavaScript object was attached to the DOM object. Finally, a script window highlights the exact point in the JavaScript code where the memory leak originated.
More information can be found in the Docs ENCLOSED with the Binaries .

JavaScript Memory Leak Detector (v2)

分类:Web 时间:2010-04-09 人气:818
blog comments powered by Disqus


  • Windows Azure SDK 1.5.Windows Azure Tools for Microsoft Visual Studio 2010和新的服务管理功能发布了 2012-03-09

    在昨天BUILD 的上的两个主旨发言中,微软宣布了Windows Azure SDK 1.5 和 Windows Azure Tools for Microsoft Visual Studio 2010的可用性.你可以使用Web Platform Installer在这里下载该工具.这三个新发布的产品都旨在简化开发.部署和管理Windows Azure平台. Windows Azure SDK包含以下新功能: 重新架构的模拟器确保了本地和云计算的开发和部署之间更高的保真度. 很多根本性的改善(模

  • Use Visual Studio 2008 to create your first Windows Mobile program introduced 2010-12-24

    Introduction Microsoft Visual Studio 2008 Professional Edition or later versions provide a Windows Mobile application development environment that allows you to use native code (C / C + +) or managed code (C # / Visual Basic.NET) for the Windows Mobi

  • Monitor memory leaks 2010-12-07

    If some system performance is not very stable, and change over time, then they would wonder whether the system is a memory leak. In particular, which more and more slowly over time the system has been largely Java object memory leak. Java Virtual Mac

  • Java memory leaks and overflow the difference between 2010-04-13

    The allocation of memory is your memory than the system can give you, the system can not meet the demand, spillover. Memory leak is not cleared up the memory garbage, resulting in system memory can not give you the resources (memory, resource depleti

  • Java memory leaks and overflow of the difference between 2010-05-07

    Recently to see the face of questions about JAVA, are on the memory leaks and overflow. Then see this topic, I felt a little paste. Then check the following information. Under the combination of its own conclusion on the difference between memory lea

  • Conventional circular reference memory leaks and memory leaks Closure 2010-06-01

    To learn javascript memory leak problem, we must first understand that the GC principles of javascript. I remember the original books in the rhino "JavaScript: The Definitive Guide" in the seen, IE uses the GC algorithm is counter, it only hit w

  • IE memory leaks and can not recall of Summary (growing) 2010-09-21

    1, memory leaks really seen a lot of information before, but the eldest brother of the words were the finishing touch, not flatter him, and suddenly opened up my Renduermai, see: trarck writes IE The reason is that under the circular reference memory

  • Using Internet Explorer from .NET 2012-03-09

    Earlier in this book we have looked at how to read HTML from websites, and how to navigate through websites using GET and POST requests. These techniques certainly offer high performance, but with many websites using cryptic POST data, complex cookie

  • 从Internet Explorer迁移到Mozilla 2011-05-17

    本文正在翻译中,原文请参考 Migrate apps from Internet Explorer to Mozilla 简介 当Netscape最初推出Mozilla浏览器的时候, 特别考虑对W3C标准的支持. 所以Mozilla并不对Netscape Navigator 4.x 和微软IE遗留的源码做向后支持. 例如, Mozilla不支持<layer>, 我在后面会进行讨论. 那些像IE4一样, 在W3C标准概念之前开发的浏览器遗留了很多毛病. 在这篇文章里, 我将描述Mozilla的&

  • Internet Explorer and the CSS box model 2012-03-03

    原文地址: One of the differences between Internet Explorer and standards compliant Web browsers that cause a lot of trouble for CSS beginners is the CSS box model. Since

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C), All Rights Reserved. 版权所有 闽ICP备15018612号

processed in 0.310 (s). 10 q(s)