|GDI leak begone!
||[Friday 1st August 2008 at 10:09 pm]
|||||Dreams of Hope ~ Awesome [Dreams of Hope.mo3]||]|
I was getting fed up with running out of desktop heap all the time, so I decided to actually poke around and find out what was eating all the GDI handles. Several blind alleys were involved while I tried and failed to find a fancy way of doing it (that would pinpoint not just the process, but the library responsible), though I did trip across useful tool by Feng Yuan that tracks GDI usage by object.
I then decided to apply Common Sense, and guessed that an add-in for Internet Explorer would be leaking GDI handles. So, dump gdiobj.exe on the second screen (though I could have used Task Manager), start up IE on the first screen, and watch the numbers as I open and close new IE windows (via Ctrl+N). It appeared to be leaking 30 handles, so I tried disabling add-ons in turn (restarting IE each time) until this number got smaller. IE Developer Toolbar, no effect, Sun stuff, no effect, Messenger, no effect... Norton Confidential Browser Helper Object, handle leak becomes maybe 1 handle per three windows. Hah.
I then re-enabled the earlier add-ons to verify that none of them were also leaking, and for good measure then disabled a few more unneeded ones until the annoying 2-second delay on spawning a window became sub-second. Result: a browser that feels (and is) faster, and that can give me more windows before eating the desktop heap.
Edit: what a surprise, IE is *still* leaking handles. Any bets for what might be the culprit now?