Issue Details (XML | Word | Printable)

Key: MAP-404
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Steven M. Ottens
Reporter: Steven M. Ottens
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Community Mapbuilder

Memory Leak

Created: 22/Jun/07 03:13 AM   Updated: 11/Dec/07 08:53 AM
Component/s: mapbuilder-lib
Affects Version/s: 1.0rc2, 1.0, 1.0.1, 1.5alpha1
Fix Version/s: trunk

Time Tracking:
Not Specified

Environment: Any mapbuilder setup where one switches between mapbuilder-pages (eg. the example site in /demo)


 Description  « Hide
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

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Steven M. Ottens added a comment - 09/Aug/07 05:15 AM
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.


Gertjan van Oosten added a comment - 05/Nov/07 01:07 PM
Some of these were fixed on trunk, r3242.

There are still leaks left, most notably in OpenLayers.Layer.Vector (can be seen with Drip in the WFS-T demo).


Cameron Shorter added a comment - 07/Nov/07 02:06 PM
Openlayers issue tracking memory leaks is: http://trac.openlayers.org/ticket/369

Andreas Hocevar added a comment - 11/Dec/07 08:53 AM
Many memory leaks have been identified and fixed. This bug should not be categorized as blocker any more.