Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Is it possible for the RAM to not be freed, even after closing the built app ?

Discussion in 'Editor & General Support' started by aurelag, Mar 1, 2022.

  1. aurelag

    aurelag

    Joined:
    Jan 25, 2021
    Posts:
    11
    Hi,

    I am developing for the Quest 2, and having a weird issue with RAM.
    When the app gets closed, the available RAM after closing the app (approx 1GB) is way less than what was available before launching the app (approx 3GB). When the app gets opened a second time, it quickly crashes because there is no RAM available anymore.
    Is it possible for the RAM to not be freed because of some process ?
    Can it come from Unity or the Quest 2 ?

    Any help is appreciated.
     
  2. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,050
    the ram stay occupied forever or gets back to normal level after sometime (maybe a couple of minutes)?
     
  3. aurelag

    aurelag

    Joined:
    Jan 25, 2021
    Posts:
    11
    The ram seems to stay occupied forever (I'd say I waited a good 10 minutes without any noticable change in ram)
     
  4. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,050
    well. have no clue but this is not normal, it appears the game or parts of game are still running.
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    When the application is closed, the OS should free any of the application's memory. Verify that the app is for certain no longer running. I don't have any knowledge if the Quest 2 has any issues in this area or is doing anything funny.
     
  6. aurelag

    aurelag

    Joined:
    Jan 25, 2021
    Posts:
    11
    Do you know of a way to assess what programs are running on a Quest ?
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Compare to new/empty project, running on the Quest. Does it behave the same way?
     
  8. aurelag

    aurelag

    Joined:
    Jan 25, 2021
    Posts:
    11
    Hi, sorry for the late reply.
    With an empty project (I used the URP sample, deleted everyting under asset and created a new empty scene) that I built for Android, it does seem like some MB are not freed when closing the app. However, with an app this small, it's something like 5MB per launch (though it does seem to add up every time) compared to the 50-ish MB used to run the empty app.

    Edit : should I submit a ticket with the empty project ?
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    What is using the extra memory in your game compared to the sample project? Use a divide-and-conqueror approach to find out. Once you find the culprit, please submit a bug report with the test app.