If I import a Movieclip from a swf library and I execute the Movieclip.play() the memory of Firefox process grows by each frame, so if the animation is a loop, the memory grows constantly. But it only happens when I run my project in Firefox with webGL. Into Firefox and canvas it works perfectly, or into Chrome in WebGL or Canvas too… is there any way to fix it?
if mcMovieclip has 10 frames in loop, the firefox memory goes up indefinitely frame by frame and the garbage collector never release the orphan shapes. I remind you that it only happens with Firefox in webgl mode, with Firefox and canvas the memory remains stable and also with Chrome in whatever mode.
I have discovered one thing, it only happens if there are vector shapes inside the frames. If there are bitmaps or I apply a cacheAsBitmap the memory remains stable.
This has been a noticeable issue in our WebGL game as well. Firefox users report that memory grows significantly after a while. We don’t have seem to have a similar problem on other browsers.
The error keeps happening only in Firefox and with Webgl. Does anyone know anything about this problem? I upload a small complete example for those who want to try it.
A few days ago I saw some old thread where @singmajesty mentioned that it was better to use Bitmaps instead of Shapes because each time the Shape is transformed it has to be drawn to BitmapData. Maybe Firefox isn’t releasing the memory allocated from the BitmapData?
Does it occur in projects that do not use shapes? Have we tested simple projects (such as DisplayingABitmap) and more complex ones (such as PiratePig) to get an idea of when this occurs?