brookd
5 Dec 2008, 1:52 PM
I am wondering, I have read that Ext will only clean up objects that are in the items array + listeners (is that right?). So lets say I have a class that extends panel,and in it I create 3 Ext.data.Store's.
What is best practice? Add a beforeDestroy() method on the class, and call destroy() on each component? Could I iterate through the object, and check the type of each object, and if its an ext class, call destroy? Should I add listeners on the stores, that listen for the panels destroy event and destroy them from there?
What about if I create a combobox, say, for an custom cell editor. If I create within my class using "this", will it be auto destroyed when the class is destroyed?
What is best practice in this regard? Will all instance variables created inside an extended class also be destroyed when the destroy method is called?
I wish there was a best practices guide to managing memory effectively with Ext.
What is best practice? Add a beforeDestroy() method on the class, and call destroy() on each component? Could I iterate through the object, and check the type of each object, and if its an ext class, call destroy? Should I add listeners on the stores, that listen for the panels destroy event and destroy them from there?
What about if I create a combobox, say, for an custom cell editor. If I create within my class using "this", will it be auto destroyed when the class is destroyed?
What is best practice in this regard? Will all instance variables created inside an extended class also be destroyed when the destroy method is called?
I wish there was a best practices guide to managing memory effectively with Ext.