Search Issue Tracker

Fixed in 2022.1.X

Fixed in 2020.3.X, 2021.1.X, 2021.2.X

Fix In Review for 2019.4.X

Votes

0

Found in

2019.4

2020.3

2021.1

2021.2

2022.1

2022.1.0a7

Issue ID

1364643

Regression

No

Profiler.GetTotalAllocatedMemoryLong increases when Scene is loaded and unloaded

Profiling

-

How to reproduce:
1. Open the attached project "MemResearch_2022.zip"
2. From the Project tab, open Assets/Scenes/MainScene.unity
3. Enter Play Mode
4. Observe the value of Profiler.GetTotalAllocatedMemoryLong printed in the Console window

Expected results: Profiler.GetTotalAllocatedMemoryLong value does not increase when Scene is loaded and unloaded
Actual results: Profiler.GetTotalAllocatedMemoryLong value increases when the Scene is loaded and unloaded

Reproducible with: 2019.4.30f1, 2020.3.18f1, 2021.1.21f1, 2021.2.0b12, 2022.1.0a9

Notes:
- The issue is also reproducible on Windows Standalone builds
- The issue appears to be caused by RegisterAllocationData or RegisterDeallocationData of DynamicHeapAllocator being not thread-safe
- The AllocatedSize exceeds the ReservedSize, so it is not a memory leak

  1. Response avatar

    Resolution Note (fix version 2022.1):

    Fixed in 2022.1.0a11

  2. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed in: 2021.2.0b16

  3. Response avatar

    Resolution Note (fix version 2021.1):

    Fixed in: 2021.1.26f1

  4. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in: 2020.3.21f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.