Instantiation, display objects and memory leaks question
Hi
Just wondering if this would be a memory leak...?
In constructor...
- create a parent sprite (call it parentSPRITE)
- this.addChild(parentSPRITE)
- instantiate a display object from your Flash Pro lib (call it testMC)
In function...
- parentSPRITE.addChild(testMC)
In another function...
- this.removeChild(parentSPRITE);
- parentSPRITE = null;// what happens to testMC here?
Then call the first function again...
- parentSPRITE.addChild(testMC)
Does this mean multiple display testMC objects are building up in memory, or does testMC get erased from the display list each time it's parent is destroyed?
Thanks for your time and help.
