Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.5alpha2
-
Fix Version/s: 1.5rc3
-
Component/s: mapbuilder-lib
-
Labels:None
-
Environment:Any mapbuilder setup where one switches between mapbuilder-pages (eg. the example site in /demo)
-
Number of attachments :
Description
If you leave a mapbuilder page, the memory occupied by the mapbuilder instance is not released. Furthermore if you return to the same page, more memory is allocated. This happens both in FF2 and IE6/7, but not in netscape 9!
A few hints can be found at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/ie_leak_patterns.asp
some tools to help to find the cause:
http://www.outofhanwell.com/ieleak/index.php?title=Main_Page.
https://addons.mozilla.org/en-US/firefox/addon/2490
According to Drip a lot of IMG elements leak. A notorious one are the buttonbar images. I believe this is due to the way we assign Disabled and Enabled images. If you load a new page, all visible img elements are destroyed, however the buttonbar images are not visible images and are not destroyed
The offending code is:
this.disabledImage = document.createElement("IMG");
this.enabledImage = document.createElement("IMG");
Here the two img elements are created. But they are never destroyed.
Apperently this also prevents the button <a> elements to get destroyed and also the buttonbar div.