
When the tilelist is destroyed, I want to clean up all the cells, remove event listeners, stop timers etc so that these cells are properly garbage collected. The problem is, there is no way to call any method of these individual cells.
- Ideally, a solution would be to write a destructor function which does the job, but no- AS3 won’t make your life that easy.
- I could have cleaned up when REMOVED_FROM_STAGE event fires in the cells, but strangely, this is fired so many times (with a button press etc) that I can not use it reliably.
- Calling tilelist.dataProvider.removeAll() merely sets the dataProvider to an empty array; doesn’t help in cleaning up the items.
I have ran out of ideas. I have been struggling with this for several days without anything working. Can anyone please help me understand how can I cleanup the cells of a tilelist properly?
If you would like to make a comment, please fill out the form below.
Recent Comments