Search Issue Tracker

Active

Votes

0

Found in

2020.3.47f1

2021.3.22f1

2022.2.13f1

2023.1.0b10

2023.2.0a9

Issue ID

UUM-31913

Regression

No

Garbage Collector allocates unnecessary memory when Script Component is enabled and displayed in Inspector

--

-

How to reproduce:
1. Open the user-attached "RepaintTest-Repro" project and open the "SampleScene"
2. Open the Standalone Profiler (Window > Analysis > Profiler (Standalone Process))
3. In Profiler select "Edit Mode" (Target Selection > "Edit Mode")
4. Select the "CPU Usage" category and observe the "Overview" section
5. Go back to the Editor
6. In Hierarchy select "RepaintTest" GameObject
7. Focus on the Inspector window (click anywhere within the Inspector)
8. Go back to the Profiler and Pause the profiling of information
9. In the "CPU Usage" category select any frame and observe the “Overview” section

Expected result: GUIView.RepaintAll.RequestRepaint does not allocate memory
Actual result: GUIView.RepaintAll.RequestRepaint allocates memory

Reproduced with: 2020.3.47f1, 2021.3.22f1, 2022.2.13f1, 2023.1.0b10, 2023.2.0a9

Reproduced on: Windows 10 (by reporter), Windows 11

Notes:
1. When the "Use Repaint" field is deactivated, the Garbage Collector does not allocate any memory
2. When the "Use Repaint" field is activated, but the component is hidden in the Inspector menu, the Garbage Collector does not allocate any memory
3. The amount of memory the Garbage Collector allocates differs from version to version
4. For Unity Editor version 2020.3.47f1 the standalone Profiler did not work, but it’s possible to reproduce with the standard Profiler (in-Editor)

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.