Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/ProfilingScene.unity” Scene
3. Open Build Profiles (File > Build Profiles)
4. Tick Development Build
5. Click “Build And Run“
6. In Player, click "Load ProfilingScene"
7. Open Memory Profiler (Window > Analysis > Memory Profiler)
8. In Memory Profiler window, select Player and click Capture
9. In Player, click "Load MainScene"
10. Repeat steps 6-8
11. In Memory Profiler window, select first Capture
12. In All Of Memory tab and seach for “CameraMetadataCache“
13. Expand “Managed“ and “Managed Objects“
14. Observe Allocated Size of “UnityEngine.Rendering.Universal…”
15. Repeat steps 12-14 for second Snapshot
Expected result: Allocated Size is the same for both Snapshots
Actual result: 2nd Snapshot has Allocated Size higher by ~48 B
Note that this increase will occur every single time the scene is changed, and continues growing indefinitely
Reproducible with: 6000.4.0b3, 6000.5.0a4
Could not test with: 6000.0.65f1, 6000.3.3f1 (Library\PackageCache\com.unity.memoryprofiler@077eae9ba83a\Editor\Utilities\EditorAssetFinderUtility.cs(809,75): error CS0234: The type or namespace name 'GUID' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?))
Reproducible on:
Windows Standalone Player
Play Mode
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Notee:
- "UnityEngine.Rendering.Universal.UniversalRenderPipeline.CameraMetadataCache.s_MetadataCache" grows and its items/memory is never released. In Memory Profiler check "Managed/Managed Objects/UnityEngine.Rendering.ProfilingSampler" for example