Increased untracked memory between snapshots.

Hi,

I’m currently working on an optimization in a game with a new navigation screen system using one scene per screen, instead of a single scene. We went from having every screen referenced in a ScriptableObject that was loaded via Resources.Load() to additively loading a scene for each screen.

Although I can see an improvement comparing both android versions with the memory profiler (v 0.0.7), I’m seeing that the memory that was released in the old implementation still remains in the new implementation, but under the category of “Untracked Memory”.

Comparing both snapshots I can assure that the prefabs and textures were removed jumping between screens, but In the overall I can see that total memory remains the same:

8987092--1237036--Screenshot 2023-04-28 at 12.34.21.png

Do you guys have any ideas why this is happening?

1 Like

I would suggest that potentially those could be graphics resources. Which version of Unity do you use and what patform is this?

We did substantial improvements to graphics memory tracking for 2023.2 (and recently backporting those to 2022.2) as e.g. such objects as RenderTextures weren’t properly accounted. I would ask to check 2022.2 if possible

Hey FuriaFurini, have you found out what caused those untracked memory increases?

I am currently facing the same problem: Unmanged memory increasing up to 2GB as you progress the game. When I inspect some Unity Objects in the profiler I also get the hint "This Native Object is associated with an invalid Managed Object [...]" which is a bug apparently. Profiler version is 1.1.0-exp.1, used in Unity 2023.1.6f1, taking snapshots of a dev build made in Unity 2021.3.9f1. Loading scenes additively through Addressables (1.21.14)

Any idea why this could happen @alexeyzakharov ?