all groups > flash (macromedia) > october 2004 >
You're in the

flash (macromedia)

group:

flash garbage collection, how does it work?


flash garbage collection, how does it work? scottjanousek
10/14/2004 9:18:55 PM
flash (macromedia):
I have a flash projector which is eating up a lot of memory when movieclips
fade in and out ... the clips just contain static images ... wondering is this
normal behavior or a memory leak problem ... I tried removing the clip via
having a blank keyframe ... as well as attaching and removing the clip ... but
I still get the problem ... not sure what it is ...

My guess is flash takes up as much memory as it needs and rarely does garage
collection ... is thre anyway to force garbage collection like in java????

scott@[REMOVE THISNOSPAMTITLE]scottjanousek.com

Re: flash garbage collection, how does it work? RTalisman
10/14/2004 11:13:54 PM
scottjanousek,

If you are using LoadMovieClip, then use UnloadMovieClip to free your ememory
again - though this is dependant on your other loading procesures - your O/S -
and a bout a hundred other possible things. If you are simple using a mmovie
from the Library - or direct from the Stage - you have no real way out...
loading a 500 MB avi is bound to consume system resources. And a 2.0 GB file or
higher will slow the avarage home computer down to a lsow grind at the best of
times. Either find a more efficient format for the movie that Flash will
display, or find an entirely diffeent way to display the movie. There is not
much more you can do, that I can think of right now, at least...

Regards,

Rangar Talisman
Re: flash garbage collection, how does it work? urami_
10/15/2004 8:01:20 AM


[quoted text, click to view]

Flash is CPU intensive and ALpha in conjunction with tween in particular very much so.
That's why many of us do not use it at all or at least try to avoid it.
What we do is we place single color shape on top of the image and fade it alpha
because single color is way less CPU intensive the complex image , than fade it out to
transparent so the illusion is pretty much the same.
Try ...

This is also recommended if you try to fade in text, large number of characters become
heavy wile alpha so place on top shape and fade out the shape , making it looks
same and way more smooth.

On top of it, you could use Easing Equations. SOme projects have cross fade and require to see the
images blanding into another so shape idea is out.

There are online Easing Equations , ActionScript 1.0 Equations and ActionScript 2.0
http://www.robertpenner.com/easing/
Which can help you build some really very smooth fading for large and lots of images.


--


Regards


urami_*

<hol>
http://flashfugitive.com/
</hol>


By The way:
Re: flash garbage collection, how does it work? Jeckyl
10/15/2004 9:58:20 AM
A movie-clip's definition will remain in memory (in case you need it again
later), even if there are no instance of that clip on stage.

Same for things like images etc.. all the content in your movie remains in
memory, even if it has been placed and then removed.

In SWF files there is a freeCharacter tag available that actuallyremoves the
definition, however, you cannot create one using Flash. Some video->swf
tools (before FLash supported video directly) use this tag so that the
images for each frame are freed after they are displayed to reduce memory
overheads.

AddThis Social Bookmark Button