High GPU memory consumption on SceneCapture2D component

I am experiencing a major surge in GPU memory consumption when I add a large texture to the SceneCapture2D->TextureTarget in the editor and the memory never recovers. My editor becomes slow and unresponsive even after I remove the RenderTarget from the TextureTarget variable slot. I understand that a large resolution RenderTarget may result in extremely poor performance, but after removing it from use I would assume that the references to it would be cleared and that performance should recover. I am able to stabilize memory usage by closing the editor and opening it again so I have a feeling that it may not be collecting garbage correctly.

Are there steps that I need to do to clear out references to the large texture when it is no longer in use?

Repro steps:

  • Create an actor with a
    SceneCapture2D component
  • Disable CaptureOnMovement and
    CaptureEveryFrame
  • Create a large (2k-8k) RenderTarget
  • Assign the new RenderTarget to the SceneCapture2D->TextureTarget variable slot
  • Place in world
  • Clear value from the TextureTarget

This is using Unreal 4.20.3 C++ build.

Display Device

Manufacturer: NVIDIA

Chip type: GeForce GTX 1070 Ti

Display Memory: 40820 MB

Dedicated Memory: 8087 MB

Shared Memory: 32733 MB

Pre-execution memory usage

Post-execution memory usage

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks