Search Issue Tracker

Fixed in 2019.3.X

Votes

0

Found in

2017.4

2018.4

2019.2

Issue ID

1133979

Regression

No

Unity Editor's Memory Usage grows when profiling (showing up in the profiler when profiling the Editor or Playmode)

Profiling

-

To Reproduce:
1. Open a new and empty project
2. Open the Profiler Window
3. Make sure your profiler target is the Editor
4. Make sure "Record" is set
5. Make sure Memory Profiler Module is added to the active Profiler modules
6. Select the Memory Profiler to see the Memory Profiler stats
7. Enter Playmode (and/or hit Profile Editor)
8. Observe the memory value for "Unity"

Actual: Memory usage for the category "Unity" grows slowly (~10mb/m) but seemingly indefinite. When hitting "Clear", the memory usage for "Unity" resets to a stable base value.

Expected: "Unity" Engine memory usage might grow initially but stabilizes at some point and grows no further.

Reproduced in 2019.2.0a6, 2019.1.0a13, 2018.3.0f2, 2017.4.5f1 (Note: for 2017.4 it's the Mono category that grows, "Clear" affects it the same way though.)

Reason: While the Profiler can't show more than 300 frames, the profiled frames are retained in memory until the user hits "Clear". Because the Editor/Play-mode Player is profiled, the memory used for these captured frames is also captured. Further, it is not categorized under "Profiler".

"Workaround" 1: Don't rely on the "Unity" (or "Mono" for pre-2018.x versions) when profiling in the Editor while trying to find memory leaks. Profiling in the Editor is also generally not recommended as memory usage in the Editor is not representative of a built player on the target device. Instead, profile a build on the target device.

Note: The Unity Editor's memory usage also grows when profiling built player, as can be observed in system monitors or other profilers directed to profile the Editor. This is the same issue.

Workaround 2: If issues arise, due to the growing memory usage, press Clear in the Profiler Window.

  1. Resolution Note (fix version 2019.3):

    Fixed in 2019.3.0b1

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.