I have a some javascript (used with google maps api) that I am testing on IE and Chrome and noticed memory leak symptoms in IE only: when I refresh the page continuously, th
Update:
I tested the code above with drip.exe and it seems that there is really something like a memory leak. The memory usage went steadily up while running the code with auto refreshing for some minutes.
Update 2:
I think this is the bug: http://code.google.com/p/gmaps-api-issues/issues/detail?id=1555&can=1&q=unload&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Internal%20Stars
Most of the answers so far will help you get there so i am adding a link to an article on IBM Dev Works for Memory leak patterns in JavaScript (you might find it helpful)
http://www.ibm.com/developerworks/web/library/wa-memleak/
You need to also execute GUnload before leaving the page. Simply add an "unload" event:
<body onload="initialize()" onunload="GUnload()">
Read more about this leak at the Google Maps API
One well-known source of IE memory leaks is the (deliberate or accidental) trapping of Javascript "stuff" in closures (functions) bound as event handlers to DOM elements. Most frameworks try hard to clean out event handlers explicitly for that reason.