Search Unity

How can I clear memory on a webgl reload

Discussion in 'Web' started by dansav, Nov 15, 2019.

  1. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    I have unity in an iframe on a page. Unity 2019, firefox, The outer frame has settings that the user can change and the reload the game, but unity webgl gets slower and slower with each reload. I notice that the firefoxCP web content memory keeps going up after every reload Is there any way to clear this out? After about 5 reloads the webgl runs really poorly and sometimes won't load.

    Reloading the outer frame seems to do the same thing increase the memory each time.

    There are a lot of posts on the forum and unity answers about this that have no solutions.

    Would reloading the scene and not the page help?

    Also I am currently not using the webgl player setting of data caching because a recommendation I read said to let the browser handle it. Are there any best practice for avoiding webgl reload memory problems.
     
  2. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    Upon further investigation reloading any webgl on firefox or safari seems to keep increasing the memory size on desktop or mobile. I'm using indexdb and data caching. Is there any way to clear the browser memory on a webgl page reload?
     
  3. maart

    maart

    Joined:
    Aug 3, 2010
    Posts:
    82
    Have you ever figured this out?