Grid clean up properly?
I am implementing a Grid view using version1.0 and run into the road block regarding cleaning up grid. My application uses a single DIV ("viewDiv") to display AW grid and other views, such as bar chart. So, between grid and bar chart, I use
document.getElementById("ViewDiv").innerHTML = "";
to clean up the display area DIV.
But, my bar chart also has its resize event handler, when the DIV is showing bar chart and the brower is resizing, I notice that, in Firefox, the Grid's resize event handler is called as well.
I tried to null out the grid before showing bar chart, I still get the same problem.
So, what is the surest way to clean up the grid? how do I explicitly remove resize event handler if grid's clean up is not possible?
Another quick point - if you are re-using the same grid object there (hopefully) should not be memory leak, but if you keep creating new ones - the old will be still in memory referenced by global AW objects array.
Is there a way to access global AW objects array and clean up the created grid objects?
That way you don't need to remake the grid each time.
I would presume the resize thing can be replaced like with other events never done that my self so can't comment (sure someone else has though)
you can get access to the global reference array as Active.System.all, index is object id, and
obj === Active.System.all[obj.getId()];
If you create new AW objects in a loop - you should clean up the references from Active.System.all
This topic is archived.
Back to support forum
Version 2Looking for AW 2.6 ?
The old site is here.