Paolo Severini, a developer from Microsoft's GPDE team in Europe has created a debugging tool to detect memory leaks in JavaScript code and is downloadable here. It can be installed as an Internet Explorer band and it is expressly designed to find memory leaks in JavaScript code that runs in Internet Explorer.

Like any IE Band, the JavaScript Memory Leak Detector is a COM in-process DLL loaded in the Internet Explorer process. The fact of living inside the IE process allows it to easily intercept some of the API calls made by the IE code. In this case, we are interested in intercepting every call that creates a Jscript engine.

The Jscript engine is a COM object, and it is instantiated by Trident (mshtml.dll) with a call to CoCreateInstance(). Therefore, the first operation made by the tool will be to intercept the calls to CoCreateInstance made by the mshtml module.

Please check out the blog about this very useful tool, then download the thing and give a try!

Note:  There are no details available on how this tool interacts with Internet Explorer 8.0, so please keep this in mind if you are running the beta.

Regards,

The IE Support team