Firefox memory growing (only with webgl)


If I import a Movieclip from a swf library and I execute the 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?


Any help? Does this happen to anyone?

I am going to put an example:

Assets.loadLibrary(“game”).onComplete (function (e)

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.


PD: Sorry for my english

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 persists… nobody knows anything about it?

Thanks :slight_smile:

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 openfl test html5 -Dwebgl1 make a difference in the behavior?

Exactly, with Bitmaps works perfectly but I need to use vectorial shapes into the frames.

No… the same thing happens :frowning:

Do you use any bitmap patterns in your shapes? I recall a bug specific to Firefox where it would not release canvas patterns

I also have an issue with Firefox crashing while in WebGL using Away3D.

No, I don’t use any bitmap patterns in my shapes. The error happens with simple shapes like a circle if in each frame I change the dimensions.

This mistake has been driving me crazy for months xD

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?