Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What happens to memory demands as Swfs load and Unload? 1

Status
Not open for further replies.

Chris99

Technical User
Jan 11, 2001
18
CA
If I load Movie1.swf (3 megs in size) into level 1 of my projector and then load Movie2.swf (5 megs in size) into the SAME LEVEL, am I correct in stating that Movie1.swf is thus completely removed because Movie 2 was loaded into the same level? And if so, what happened to the 3 megs of data associated with Movie1.swf? Was the computer's memory (RAM/HDD) automatically cleared of all 3 megs of data as soon as Movie2.swf loaded?

I am asking this because if memory IS automatically cleared of a previous swf's data whenever a swf is loaded into the same level, then I guess there would be no memory problems if one were to load and unload several swfs of about 3 to 5 megs size into the same level. Correct? Otherwise, if memory is not cleared of a previous swf's data, then I imagine sooner or later there's be serious problems.

Thanx in advance for any insights anyone might have on this :) !

I want to Learn :D !!
 
when a movie clip goes offstage, or an object is redefined, that object's entry internally in Flash is zeroed out - but the releasing of its memory allocation ("garbage collection") does not take place immediately.

Garbage collection happens when either enough free CPU cycles are available, or when the object count has increased by a certain percentage, in which case it tries to steal a few cycles to clean up as much as it can.


The exception is when the delete() command is invoked - this prompts immediate garbage collection. so if you are concerned about memory i would load the swf into empty clips and create/delete these clips as and when necessary.

 
Thank you for clarifying this issue about memory and swfs loading and unloading. I will try out your suggestions :)


I want to Learn :D !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top