Release a SceneCaptureComponent2D from GPU memory

Hello everyone,
As the title suggests: As soon as I initialize a scene capture’s texture target to a render target (be it persistent from the content browser or created via script) that has a size of 4K (I believe it’s also the case with small sizes, just not noticeable) it consumes a huge amount of VRAM. I can understand it’s normal to take up to 3GB of VRAM for a 4K render target, but one would think it would release the resource as soon as I stop PIE (which is not the case here).

I’ve tried setting the texture target to null, also using the releaseRenderTargetFromMemory function call with no avail, using a mem report shows the render target object instance was deleted, but not the memory that’s now residing in RHI stats.

Does anyone have a clue if this has a plausible solution? is this a bug with the engine?

1 Like

Also dealing with this, I create a large render target then after using it I remove all references to it. However it still remains held in the Render Target 2D Memory. I’ve tried calling ReleaseResource() and MarkAsGarbage() ConditionalBeginDestroy() and nothing has worked

Any ideas would be appreciated