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)
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.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- URP Package documentation link in Package manager leads to the deprecated page
- [Usability] No setup script for Render Pipeline Assets for the proper URP Sample usage
- csc.rsp -additionalfile files are not treated as dependencies and are not reloaded when the file contents change
- Error ‘cannot use casts on l-values’ when a variable is assigned inside a second-level nested if statement before being used in a conversion
- "You cannot save to an invalid folder" warning dialog box is shown when canceling Tile Palette creation
Resolution Note (fix version 2019.3):
Fixed in 2019.3.0b1