Not signed in
Copyright © 2026 Unity Technologies
Closing this because the issue is fixed in 6.0. Backporting to 2022 would be a significant piece of work because other systems have changed between these versions. If backporting is necessary for a user we can reopen this issue and look into it.
Reproduction steps:
1. Open the attached “LeakTest“ project
2. Open the “Assets/SampleScene.unity“ Scene
3. Change the path in the “Assets/LeakTest.cs“ Script to a valid path on your system (memory snapshots are going to be stored there)
4. Open the Build Settings (File > Build Settings)
5. Enable the Development Build checkmark and make sure the Scripting Backend is set to “IL2CPP“ in the Player Settings
6. Build and Run the project
7. Open the Memory Profiler (Window > Analysis > Memory Profiler)
8. Add the 1st and the 200th snapshot from the snapshots folder (path that you’ve set on the 2nd step)
9. Compare snapshots
Expected result: Memory usage between both snapshots should be similar. No tool's overhead (Memory Profiler) tagged as part of the game's
Actual result: There’s a visible increase in memory usage between the 2 snapshots. Memory Profiler specific memory is shown in the snapshot as the game's memory
Reproducible with: 1.1.1 (2022.3.51f1, 6000.0.24f1)
Couldn’t test with: 0.7.1-preview.1 (2021.3.45f1) - MemoryProfiler.TakeSnapshot doesn’t exist
Reproducible on: M1 Max MacOS 14.6.1
Not reproducible on: No other environment tested
Notes:
Sign in to see your voted issues