Search Issue Tracker

Fixed

Fixed in 6000.5.0a5

Under Consideration for 6000.5.X

Votes

0

Found in

6000.4.0b3

6000.5.0a4

Issue ID

UUM-131348

Regression

No

UnityEventBase.s_UnityEvents memory leak occurs when loading and unloading Scenes with uGUI components

Scripting Runtime

-

Reproduction steps:
1. Open the attached project "ReproProj"
2. Open Build Profiles (File > Build Profiles)
3. Select Development Build
4. Click “Build And Run“
5. In Player, select “Load ProfilingScene“
6. Open Memory Profiler (Window > Analysis > Memory Profiler)
7. Click “Capture Snapshot“
8. In Player, select “Load MainScene“
9. Repeat steps from 5 to 7
10. In Memory Profiler, select “Compare Snapshots”
11. Select both snapshots
12. Click “All Of Memory“ tab
13. Observe the items and memory of "Managed > Managed Objects > System.WeakReference<UnityEngine.Events.UnityEventBase>"

Expected result: 1 item exists and Size Difference is 0
Actual result: Size Difference is about 62.8 KB and multiple items are present

Reproducible with: 6000.4.0b3, 6000.5.0a4
Could not test with: 6000.0.65f1, 6000.3.3f1 (Library\PackageCache\com.unity.scriptablebuildpipeline@ca3e2d96aa2f\Editor\Interfaces\IBuildCache.cs(19,46): error CS0234: The type or namespace name 'GUID' does not exist in the namespace 'UnityEngine')

Reproducible on:
Windows Standalone Player
Play Mode

Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested

  1. Resolution Note:

    Fixed in 6000.5.0a5

  2. Resolution Note (fix version 6000.5.0a5):

    Fixed in 6000.5.0a5

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.