0

I'm having a hard time managing my memory in flash lite. are there any pointers i should care about ? or best practices?

ive been reading every 60 seconds the garbage collector runs.

i'm deleting my objects/movieclips like

mc = null; delete mc;

and making sure every listeners is deleted on it.

still nothing seems to happen..

Andy Jacobs
  • 15,187
  • 13
  • 60
  • 91

1 Answers1

2

Flash's garbage collector isn't deterministic - it runs when it can run and while it may check to see if it can run at a regular interval, there's no guarantee it will run. If your SWF is constantly chewing CPU the GC will never have time run.

Flash Lite uses ActionScript 2 which does have one "nuke" option for visual assets - MovieClip.unloadMovie(). If you've got a movieclip, running unload on it will kill everything within it.

Branden Hall
  • 4,468
  • 18
  • 19