Memory leaks have been observed in the FL2.x players on devices.
If you find that your application is leaking memory then try replacing movies and re-using existing objects. This causes the player to forcefully recover the memory.
unloadMovie There is a known memory leak with the unloadMovie function observed in the Flash Lite 2.x players. This is also a useful tactic when building image gallery style applications, always re-use the movie clips.
There are other ways to unload movieclips by using the standard APIs, here we look at solving the memory leak problem above.
loadMovie("url",level)or var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth()); // only called once! var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener(this); mcLoader.loadClip("YourImage.jpg", container); function onLoadInit(mc:MovieClip) { trace("onLoadInit: " + mc); }
The suggestion here is that instead of unloading, by simply “replacing” a movieclip the previous movie will be forcefully removed.
+