Firefox not releasing memory

I’m seeing a strange error in Firefox using WebGL where the memory used is not getting released when the window containing the webgl is closed.

So the full story is this.
We launch our game/application into it’s own window from our parent website.
When I do that I can see the firefox.exe memory use go up, fair enough so far.
However when that window is closed the memory is not released.
So if you keep opening things the memory goes up and up.
Once you close the browser tab that spawn the window then and only then is the memory finally released.

Given that many people just leave tabs open that they use often this is not a very ideal scenario especially for people stuck on 32-bit versions of Firefox.

Does anyone know of a way to force the browser to release WebGL memory once the containing browser window is closed?
Is this just a nasty bug with Firefox?

does Firefox eventually run out of memory?

On 32-bit machines yes it seems to crash a lot. On 64-bit it there seems to be more of a buffer so it’s less of a problem, the only issue I hit there is the need to have a fixed amount of memory in use. Since certain aspects of our code can use more memory at certain times and some things can cause it to increase more over time it’s a bit of a problem having to declare it all at the start.

Hey there,
I have encountered a similar issue, but with page refresh.

In my setup the player is started after the press of a button, but for some reason Firefox will sporadically not release memory after the page is refreshed.
Both the about:memory page and the task manager keep on showing the previous memory allocation.

Info
m_EditorVersion: 5.5.2f1
Firefox 52.0.2 (32-bit)

Same here.

Response from Unity on my case submit:

1 Like

Thanks for the answer,
unfortunately I have been able to reproduce this issue with Firefox 64bit as well.

If you can reproduce this error consistently then please file a bug report with the Mozilla project. They are nice guys.

1 Like