OpenLayers OpenLayers

Ticket #577 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

layerswitcher in IE leaks memory like a seive

Reported by: euzuro Assigned to: euzuro
Priority: critical Milestone: 2.4 Release
Component: Memory Management Version:
Keywords: Cc:
State:

Description

double circular reference

Attachments

layerswitcherMem.patch (2.7 kB) - added by euzuro on 03/28/07 20:45:12.
dont add circular refs to inputElem. bind them into a context.
layerswitcherMem.2.patch (5.8 kB) - added by euzuro on 03/28/07 21:26:05.
as per previous comment, i have refitted this patch so that it does things the proper way, which means cleaning up after itself -- not just letting things slide until the unloadCache() is called. Also, this improvement to the patch fixes a problem in the updateMap() function where we were still relying on the layer to be tagged off of the inputElement (the circular ref we are here deleting)
layerswitcherMem.3.patch (6.1 kB) - added by euzuro on 03/28/07 21:38:03.
one little tiny but was leftover from original. this.checked -> this.inputElem.checked

Change History

03/28/07 20:45:12 changed by euzuro

  • attachment layerswitcherMem.patch added.

dont add circular refs to inputElem. bind them into a context.

03/28/07 20:45:52 changed by euzuro

  • keywords set to review.

03/28/07 20:46:41 changed by euzuro

note for posterity:

instead of doing:

        this.baseLayersDiv.innerHTML = "";
        this.baseLayerInputs = new Array();
        
        this.dataLayersDiv.innerHTML = "";
        this.dataLayerInputs = new Array();

we should really cycle through and properly destroy each thing. but for now, this works.

03/28/07 21:26:05 changed by euzuro

  • attachment layerswitcherMem.2.patch added.

as per previous comment, i have refitted this patch so that it does things the proper way, which means cleaning up after itself -- not just letting things slide until the unloadCache() is called. Also, this improvement to the patch fixes a problem in the updateMap() function where we were still relying on the layer to be tagged off of the inputElement (the circular ref we are here deleting)

03/28/07 21:38:03 changed by euzuro

  • attachment layerswitcherMem.3.patch added.

one little tiny but was leftover from original. this.checked -> this.inputElem.checked

03/28/07 22:39:46 changed by crschmidt

  • status changed from new to closed.
  • resolution set to fixed.

07/05/07 17:01:43 changed by euzuro

  • keywords deleted.