Jump to content
Search Community

Dispose swf content.

Fusion test
Moderator Tag

Recommended Posts

Hi,

 

I'm trying to use the dispose() method but it doesn't work like I had expected.

I have 3 swf's: "Menu", "Game" and "Container". The last one loads in the first two.

But, when I'm done with the menu, I'd like to unload the swf and all the classes I had loaded in it.

 

menu = (LoaderMax.getContent("Menu.swf") as ContentDisplay).rawContent;

//...

(LoaderMax.getLoader("Menu.swf") as SWFLoader).dispose(true);
removeChild(menu);
menu = null;

 

With the code above, the classes won't be garbage collected.

Is there an option to remove them all without setting every instance to null in the "Menu" swf?

I've already tried to use a different application domain.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...