2

I am getting aw snap or sometimes not enough memory problem when I reload my WebGL page. I have a WebGL project which is empty (just a camera + light), developed in unity3d. I am reloading it, and profile its memory. enter image description here

As you can see that its load 1.2MB in the first load than 1281 MB in second then 1574 then 2160 and then get crash. I am amazed that why it is happening?

I searched and found that

2
  • Which build option do you use? WebAssembly or asm.js?
    – dome12b
    Mar 19 '19 at 10:35
  • I am using web assembly Mar 19 '19 at 11:24
1

One of Unity fellows told that when browser Dev Tool is open, each page reload will increment the memory: "

One point to note is that when profiling memory usage on page reloads in Firefox, make sure to have the Firefox web console (and debugger) window closed. Firefox has a behavior that if web console is open, it keeps the Firefox JS debugger alive, which pins all visited pages to be cached in memory, never reclaiming them. Closing the Firefox web page console allows freeing the old pages from memory

BUT

My testing suggests that it is true for Chrome but not for firefox. Firefox keeps increments the memory with each page reload no matter your Dev tools are open or close.

But my problem resolve in chrome (still question on firefox? I guess it the default behaviour of browser), after closing the dev tools memory is not incremented on chrome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.