Memory leak in FCanvasBatchedElementRenderItem::Render_GameThread?

There appears to be a memory leak in FCanvasBatchedElementRenderItem::Render_GameThread, depending on the path taken. If the first branch (if( Data->BatchedElements.HasPrimsToDraw() )) is taken, Data is deleted by the render thread, but nothing appears to be deleting Data if we don’t take the first branch. If FCanvas::Allow_DeleteOnRender is set on FCanvas::AllowedModes, Data will be cleared without deleting that memory.

Also note that FCanvasBatchedElementRenderItem::Render_RenderThread DOES delete Data in that case - but Render_GameThread doesn’t.

Steps to Reproduce
I believe this will happen anytime you’re rendering debug text to the screen using FCanvas (anything that results in calling FCanvasBatchedElementRenderItem::Render_GameThread)

Hello,

Thanks for reporting the issue, we’ll fix that ASAP!