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

Posted on 2008-11-11
Last Modified: 2013-11-11
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 {


					new LocalConnection().connect("foo");

					new LocalConnection().connect("foo");

			}catch(error : Error){



var parentObject:Object = new Object();

function createMc():void{

parentObject.MyMovieClip = new MyMovieClipClass();



function delMc(){



Open in new window

Question by:macauken

    Author Comment

    but i found if i minmize the player window and maximum it, the memory decrease
    LVL 39

    Accepted Solution

    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.

    Author Comment

    i see, thanks blue-genie

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
    While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
    The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
    The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now