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
- Mouse input is registered incorrectly in Custom RP when downscaling Render Target and rendering Overlay UI before final upscale
- Time.deltaTime is locked to the display's refresh rate when the built Player is moved to a Secondary Display and Windowed Mode is used
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
Resolution Note (fix version 10.1.0):
Materials no longer leak after entering and exiting Play Mode