grid leaks memory in AW.all
There seems to be a memory leak in the AW.all array caused by adding and removing grid objects dynamically. For each grid object I create, an entry is added to AW.all. To remove that entry when I remove the grid from the DOM, I call
where 'id' is the id of my grid. However, there seem to be other <span> objects in AW.all that belong to the deleted grid, all with IDs of "awNN". For example:
The $owner field of this <span> object points back to my grid object (id = "grid25"), so my grid objects are never released. This leaks a lot of memory.
The pattern in the AW.all array is always like this:
... etc. And the <span> is always for the last cell in one of my deleted tables.
Is there something else I should be doing when I remove the grid from the DOM, so that all references to it are removed from the AW.all array?
Would this work?
It seems extreme and I don't know if its safe.
I'm using AW 2.5.5.
delete AW.all[id];
where 'id' is the id of my grid. However, there seem to be other <span> objects in AW.all that belong to the deleted grid, all with IDs of "awNN". For example:
AW.all['aw95'] = <span id="grid25-cell-4-14" class="aw-item-template aw-templates-cell aw-grid-cell...
The $owner field of this <span> object points back to my grid object (id = "grid25"), so my grid objects are never released. This leaks a lot of memory.
The pattern in the AW.all array is always like this:
AW.all['aw90]'= = null;
AW.all['aw91]'= = <span ...
AW.all['aw92]'= = null;
AW.all['aw93]'= = <span ...
... etc. And the <span> is always for the last cell in one of my deleted tables.
Is there something else I should be doing when I remove the grid from the DOM, so that all references to it are removed from the AW.all array?
Would this work?
AW.all = {id:0};
It seems extreme and I don't know if its safe.
I'm using AW 2.5.5.
CK
September 2,