Search Issue Tracker




Found in


Issue ID




RTHandles in URP causes memory allocation in multi-camera scenarios



Steps to reproduce:
1. Open the “Defender 2D” project
2. Open “Camera Stacking” scene
3. Enter Play Mode
4. Compare and observe memory usage in the Windows Task Manager or Activity Monitor

Expected result: Memory usage stays the same or even decreases
Actual result: Memory usage climbs at a rate of about 5 MB/min

Reproducible with: 2021.2.14f1, 2021.3.11f1, 2022.1.19f1, 2022.2.0b10, 2023.1.0a14
Not reproducible with: 2020.3.40f1, 2021.2.13f1

Reproduced on: macOS Monterey 12.2 (Intel)

1# The issue is reproducible only in Editor
2# Removing the URP package fixes the issue

  1. Resolution Note:

    We have validated the repro project with the UUM-40249 fix and confirmed the issue is no longer reproducible.
    Based on our testing result, we close this case as duplicate.

    Quote from UUM-40249 fix resolution:
    "Fixed runtime performance drops when multiple views that uses incompatible RTHandle descriptors are rendered within a frame."
    Duplicate of

Comments (25)

  1. eureka_ger

    Sep 05, 2023 11:01

    In our case a heavy memory leak occurs once you open the Scene view while using VR:
    2 cameras are rendering. One to Oculus or open VR, one to screen. Then RAM fills up with about 2GB/Second so it's really unusable. If we disable VR everything works fine.

    Reproducible on: 2023.3.0a3, 2022.3.8f1
    Not reproducible: 2021.2.7f1

    This might be related with this bug which has been fixed:

  2. kirilledelman

    Sep 01, 2023 18:28

    I'm amazed that this still hasn't been resolved.

  3. bingchill0

    Aug 30, 2023 08:42

    This problem also exists when previewing models and animations with imported models. Mucking about with the preview window causes heaps of allocations until your OS necks itself.

  4. fadeawaygod

    Aug 28, 2023 06:50

    Is there any way to bypass this problem?

  5. feylaputh

    Aug 22, 2023 17:11


    Any update? I have been waiting for a few months for the correction and I have my project to send ASAP...

    Thanks in advance

  6. D-DutchDave

    Aug 21, 2023 11:37

    This issue needs fixing ASAP!

  7. Meatloaf4

    Aug 17, 2023 19:52

    Unfortunately, at this point, I'm not sure Unity knows how to fix this issue just yet.

    I have inquired about the fix several times since, the fix was supposedly on it's way and have received no update.

    Perhaps getting some additional attention on the thread linked below will help get the ball rolling.

  8. gamedev1506

    Jul 21, 2023 21:22

    Vote guys, one day in the next 5 years they'll solve accidentally on a next version.
    This is issue is so old, why doesn't they care about bugs ?

  9. KhDuaij

    Jul 18, 2023 19:26

    Just wanted to give an update for anyone having this issue: while still unsolved I've managed to clean my corrupted project by deleting the library file and other temp files from the repository and then on the editor package manager uninstalled and reinstalled URP. After that I've finally gotten rid of the 'ghost' render texture allocation (92.4 MB in Unity Objects Allocations). Another very important tip: Always use version control.. always if possible. I thought I wouldn't need it since I was working on a quick gameplay prototype but that was a mistake.

  10. KhDuaij

    Jul 18, 2023 15:20

    2022.3.3f1 LTS. This issue not only resulted in a memory leak but now the memory profiler (and Xcode memory profiling as well) always show that the render texture is taking 90 Mb of memory space. EVEN AFTER I have deleted the multi-camera scene and the render texture asset. It appears that the generated maps are still lurking somewhere in the project. I have tried making a clean build, uninstalling and reinstalling URP, and other tricks to no avail.

    It's honestly frustrating. Its looks like the only way forward is to start with a new clean project...........

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.