|
-
How do I know if unloadandstop has worked?
Well, the subject says it all really.
I want to unload a swf and have it removed from memory, I use 'unloadAndStop'. But how can I check if the swf / MC has really been removed?
-
rabid_Delineator
Grant skinner touched on this a while back. Basically , as long as you don't have an internal references to your loaded content , or anything inside of it , it should be removed and marked for garbage collection. When I unload dynamic objects , I will often do a preshutdown on them , to remove any internal listeners , references , etc, before I remove it completely. This usually prevents any memory leakage later. You can install , http://doudehou.googlepages.com/StatusbarEx , if you use firefox on windows , which will allow you to monitor how much memory the browser is using , and i suppose take note of the value with the swf loaded and unloaded , it should be smaller when unloaded. Assuming that the value of added memory usage when loaded is significant enough to notice. Outside of that , just checking on_removed_from_stage , and numchildren on the container clip , or display list , and setting any reference to the object to null , is about all you can do. At leas that i know of.
-
you shouldnt rely on this and should clean after yourself.
so remove listeners, stop timers, remove children, set to null and so on...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|