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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note (fix version 10.1.0):
Materials no longer leak after entering and exiting Play Mode