can not release memory in flash standalone player 9 or ver 10

I have a lot  of customize movieclip on screen , but i want to remove all of them while user back to home screen, i use dispose() function before call system.gc() in  the class, and even use delete key work to delete them cause i create them as dynami property ( please see createMc()); i can delete in a removeObj() function . i watch the memory usage in task manager, the flash will not release any memory after i remove use delMc() function.
private function dispose() : void {
			try{
					new LocalConnection().connect("foo");
					new LocalConnection().connect("foo");
			}catch(error : Error){
}
				
 
var parentObject:Object = new Object();
function createMc():void{
parentObject.MyMovieClip = new MyMovieClipClass();
addChild(ParentObject.MyMovieClip)
}	
 
function delMc(){
 delete(ParentObject.MyMovieClip);
}

Open in new window

macaukenAsked:
Who is Participating?
 
blue-genieConnect With a Mentor Commented:
ah good old flash garbage collection. I think there's been a lot of requests to the adobe techs to fix that. There's still to this day no way to force the flash player to do garbage collection. you've followed all best practices in removing items not required, make sure all references to it are deleted, make sure you remove eventlisteners when done and not needed any more, and that's about it. the rest is up to FP.

remember that if you have a clip called myclip;
and then you have a var myref:Object = myclip;
and you delete myclip, it's still being referenced by myref and hence will not be gc'd.
there are alot of articles of Flash GC on the adobe website.
0
 
macaukenAuthor Commented:
but i found if i minmize the player window and maximum it, the memory decrease
0
 
macaukenAuthor Commented:
i see, thanks blue-genie
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.