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.
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.
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
What is the difference between Camera and CineCamera?
How to delete some elements correctly when deleting an array loop?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-247691 in the post.
2 |
Component | UE - Rendering Architecture - RHI |
---|---|
Affects Versions | 5.4, 5.5, 5.5.3 |
Target Fix | 5.6 |
Created | Feb 12, 2025 |
---|---|
Updated | Feb 13, 2025 |