Friday, March 31st, 2006
Screencast on Diagnosing Memory Leaks in IE
Patrick Fitzgerald posted a nice screencast explaining how he diagnosed and fixed an IE memory leak in his tabifier library. He walks through using the free tool Process Explorer to watch IE’s memory grow with each page refresh. He writes:
This screencast discusses how I diagnosed and fixed a memory leak in a JavaScript library. It’s a very simplified example, and the same techniques probably can’t be used for more complex web applications, but it might shed some light on how these memory leaks occur.
The Microsoft Developer Network has an indepth article on what causes these leaks, and you may also want to see articles by Douglas Crockford, James McParlane, jibbering.com, and Matthias Miller (who now hosts the leak detector Drip).





What I do usually is just watch the iexplore.exe process in Task Manager, as you can see IE using increasing amounts of memory there after reloading as well. (A “fresh” window might start at 16 MB and can fluctuate slightly, but will increase if leaks are present.) Event handlers creating circular references are typically the most common cause, but not the only source, of leaks.
@Scott: I don’t trust windows task manager because it shows viritual memory used – for example, try collapsing your IE window and watch the amount of memory drop. Process explorer is free and has a lot more features, plus it shows the amount of private memory used.
Patrick: This is true, you get a much more accurate measurement with PE. I’ve noticed the effect of minimizing the active IE window also in regards to memory. Either way, you can tell that memory usage is going consistently up with refreshes under either method when leaks are present.
[…] Screencast on Diagnosing Memory Leaks in IE […]
Interesting Finds
Memory Loss
Some useful stuff if you find yourself losing memory in IE.
On http://www.Ajaxian.com about diagnosing…
[…] On http://www.Ajaxian.com about diagnosing leaks on IE. http://ajaxian.com/archives/screencast-on-diagnosing-memory-leaks-in-ie […]
IE has memory leak since 2003.
If you use IE to visit webiste : http://www.google.com,http://www.msn.com, http://www.knowleys.com for several times, it will eat more than 30M to 80M Virtual memory.