I have a container:
<mx:VBox id="mainContainer" width="100%" height="100%"/>
and the following code
private var masterView:Container;
public function loadHome () : void
{
masterView = null;
mainContainer.removeAllChildren();
masterView = new Home();
mainContainer.addChild(masterView);
}
If i call loadHome() repetively, it never deallocate Home(), and the #
of Home() objects keep on increasinng, even if i run the garbage
collection through the Profiler.
Same problem if i don't declare masterView, and instead just say
mainContainer.addChild (new Home())
Does anyone know how to explicitly free the memory? The documentation
said removeAllChildren() will not deallocate the object, but i also
set it to null. So technically the Home() has no references pointing
to it, and should be deallocated?
Any input?
Thank you
Vu