----- Original Message ----- From: "Muzak" <[email protected]>
To: "Flash Coders List" <[email protected]>
Sent: Tuesday, April 28, 2009 7:46 PM
Subject: Re: [Flashcoders] Memory concerns


If you have many listeners in a loaded external movie and then you remove
the movie are the listeners still in memory, which might cause problems
later?

Yes.


AFAIK, that's a "No". If there are no more references *to* the external movie, you should be fine.

I'm not sure that's true for Loader.unload() and event handlers..

There are problems however with external movies having NetConnection, NetStream and Sound objects.
For that, a new method was introduced:

Interestingly enough this method explicitly deals with event dispatchers and is only available in FP10.

So, you may be right but I'm not entirely convined about unload() sorting out event handlers.

Paul

Loader.unloadAndStop();

Have a look at Loader.unload() and loader.unloadAndStop()

http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html#unload()
http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html#unloadAndStop()


----- Original Message ----- From: "Paul Andrews" <[email protected]>
To: "Flash Coders List" <[email protected]>
Sent: Tuesday, April 28, 2009 7:55 PM
Subject: Re: [Flashcoders] Memory concerns


----- Original Message ----- From: "John R. Sweeney Jr" <[email protected]>
To: "Flash Coders List" <[email protected]>
Sent: Tuesday, April 28, 2009 6:35 PM
Subject: [Flashcoders] Memory concerns


I know you have to implicitly remove objects to free up memory, but does
that also apply to listeners?

Yes.


If you have many listeners in a loaded external movie and then you remove
the movie are the listeners still in memory, which might cause problems
later?

Yes.

Thanks in advance for any insights,
John

Anything with a reference to it won't be garbage collected and that includes listeners and instances referenced by listeners (unless it's a weak reference).

Paul

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to