JavaScript Memory Leak Detector (v2)

分类:Web 2010-04-09 来源 人气:763


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)

blog comments powered by Disqus


  • 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 leak and

  • 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

  • postgresql installation steps 2010-04-14

    postgresql installation steps: sudo apt-get install libreadline5-dev sudo apt-get install zlib1g-dev An official document of the steps . / Configure make su make install adduser postgres mkdir / usr / local / pgsql / data chown postgres / usr / local ...

  • Internet Explorer 1.0 9.0 Screenshots Gallery 2011-03-08

    ORIGINAL: Reliable sources show IE9 the official version of the language have been compiled, you can release this month, IE from Netscape's meteoric rise under monopoly and quickly won the throne of a

  • 10 and Visual Studio C # programming tips 2010-09-30

    C # is a great programming language, and C + + and Java, its syntax is simpler, relatively speaking, better get started, 10 years of development experience, C # programming language has become a field of strong competitors, each year We can see its progre

  • Internet Explorer 7 中文版发布 2013-12-01

    2006.11.30 Internet Explorer 7 中文版发布 Internet Explorer 7 正式版: 7.0.5730.11 Internet Explorer(简称IE)是由微软公司基于Mosaic开发的网络浏览器。IE是计算机网络使用时必备的重要工具软件之一,在互联网应用领域甚至是必不可少的。Internet Explorer与Netscape类似,也内置了一些应用程序,具有浏览、发信、下载软件等多种网络功能,有了它,使用者基本就可以在网上任意驰骋了。 Internet

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C), All Rights Reserved. 版权所有 黔ICP备15002463号-1

processed in 0.367 (s). 12 q(s)