Posted on 2007-03-30
I found that when I implemented my new menubar, I lost about 8-9MB of memory with every click and the menubar itself loaded more and more slowly. In no time at all my browser memory went from 60M to 260M. So I researched memory leaks. I found a lot of suggestions of coding practices to use. Great. Now I can improve my coding practices to avoid or minimize this problem in the future. Some of the suggested solutions I found (like event-cache.js) even make this a lot easier.
But I have a problem *NOW*. I have two menubar scripts. The first one (menubarAPI4.js) has so many script errors, the other team members can no longer debug their script code without resorting to tedious and inefficient methods which don't work a lot of times because they run into problems with the menubar code. The new menubar doesn't have the script errors but makes IE leak like a sieve. I have tried a couple of "quick fixes" like adding code to the unload event of my page to set document.body = null (which didn't work).
1. Plugs the leaks in the new menubar (jsDOMenubar from DynamicDrive).
2. Easy and quick to implement.
Nice to have:
1. Addressed other leaks too.
I really need a good working solution for our Monday morning team meeting. Thanks in advance!
PS. We use IE6. This won't change.