Community Mapbuilder

Memory Leak

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical 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 :
    0

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

Activity

Hide
Steven M. Ottens added a comment -

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.

Show
Steven M. Ottens added a comment - 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.
Hide
Gertjan van Oosten added a comment -

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).

Show
Gertjan van Oosten added a comment - 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).
Hide
Cameron Shorter added a comment -

Openlayers issue tracking memory leaks is: http://trac.openlayers.org/ticket/369

Show
Cameron Shorter added a comment - Openlayers issue tracking memory leaks is: http://trac.openlayers.org/ticket/369
Hide
Andreas Hocevar added a comment -

Many memory leaks have been identified and fixed. This bug should not be categorized as blocker any more.

Show
Andreas Hocevar added a comment - Many memory leaks have been identified and fixed. This bug should not be categorized as blocker any more.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: