Ticket #577 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

layerswitcher in IE leaks memory like a seive

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

Description

double circular reference

Attachments

layerswitcherMem.patch Download (2.7 KB) - added by euzuro 6 years ago.
dont add circular refs to inputElem. bind them into a context.
layerswitcherMem.2.patch Download (5.8 KB) - added by euzuro 6 years ago.
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 Download (6.1 KB) - added by euzuro 6 years ago.
one little tiny but was leftover from original. this.checked -> this.inputElem.checked

Change History

Changed 6 years ago by euzuro

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

Changed 6 years ago by euzuro

  • keywords review added

Changed 6 years ago 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.

Changed 6 years ago by euzuro

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)

Changed 6 years ago by euzuro

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

Changed 6 years ago by crschmidt

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

Changed 6 years ago by euzuro

  • keywords review removed
Note: See TracTickets for help on using tickets.