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
- Graphics.DrawMeshInstanced does not work when 2D Renderer and 2D Shaders are used
- SpeedTree does not move when using WindZone
- "Undeclared identifier 'LinearToSRGB'" error is thrown when creating a color variable with HDR color mode and assigning a Custom Render Texture target in Shader Graph
- Input System package is missing when creating a new HDRP project
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
Resolution Note (fix version 10.1.0):
Materials no longer leak after entering and exiting Play Mode