Search Issue Tracker
Fixed in 10.1.0
Votes
0
Found in [Package]
7.4.1
Issue ID
1260278
Regression
No
Memory Leak in URP when switching between playmode and back in editor
How to reproduce:
1. Open "case_1260278-BugRepo" project
2. Open the Memory Profiler
3. Press "Capture Editor"
4. Enter Play Mode
5. When the Play Mode is loaded, exit the Play Mode
6. Press "Capture Editor" again in the Memory Profiler
7. Open 2 most recent snapshots
8. Click on the older snapshot, and open the RenderTexture category
9. Observe the number of objects that have 0 references (RefCount)
10. Check Render Texture objects that have 0 references for the newer snapshot
Expected result: The newer snapshot has no new RenderTexture objects
Actual result: The newer snapshot has new Render Texture objects
Reproducible with: 2019.4.1f1 (7.4.1)
Notes:
- This only happens on the users modified URP package
- The User noticed that Dispose() was not being called when the Editor exited the Play Mode. A renderTexture was added that showed up in the memory profiler as a leak.
- After adding some breakpoints in UniversalRenderPipelineAsset for CreateRenderers() and Dispose() in ForwardRenderer it appears that when we exit out of Play Mode we are not calling DestroyRenderers() but we do initialize a new renderer, before destroying the previous one.
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
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
Resolution Note (fix version 10.1.0):
Materials no longer leak after entering and exiting Play Mode