Description

FRHIMemoryPool will leak data when it is destroyed.

"FRHIMemoryPool::Init()" will create "FRHIMemoryPool::DesiredAllocationPoolSize" new "FRHIPoolAllocationData" objects, stored in "FRHIMemoryPool::AllocationDataPool". These are moved back and forth between this array and a linked list. However, they are never deleted, unless "FRHIMemoryPool::DesiredAllocationPoolSize" is reduced and the entries are released.
"FRHIMemoryPool::AllocationDataPool" having entries during the destructor shows that these objects remain after the owning pool is destroyed.

Steps to Reproduce

1. Place a breakpoint in "FRHIMemoryPool::~FRHIMemoryPool()"
2. Launch the attached test project game (not editor) with the debugger attached. The attached test project contains a staged build.
3. When the breakpoint is hit, observe that "this->AllocationDataPool.ArrayNum" is not 0.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-247691 in the post.

2
Login to Vote

Backlogged
ComponentUE - Rendering Architecture - RHI
Affects Versions5.45.55.5.3
Target Fix5.6
CreatedFeb 12, 2025
UpdatedFeb 13, 2025
View Jira Issue