The RenderTargetLongLat
object of type UTextureRenderTarget2D
created inside CubemapHelpers::GenerateLongLatUnwrap
appears to be leaked. Running this function frame after frame causes a GPU memory crash with texture allocation. Calling ConditionalBeginDestroy()
on the render target has fixed the problem, though I am not sure what is the most appropriate deallocation method here. https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Editor/UnrealEd/Private/CubemapUnwrapUtils.cpp#L88
It looks like this issue would still be present on the master branch, despite the transition to the NewObject<>
allocation method.