Essentially, this memory leak should be counted in the UI section, but it is counted in the SceneRender section.
This seems to be due to the behavior of MemStackAllocator and FixedSizeAllocator.
The following workaround solves this problem. (Probably not a suitable solution)
void FSlateBatchData::MergeRenderBatches() { SCOPE_CYCLE_COUNTER(STAT_SlateRTCreateBatches); if(RenderBatches.Num()) { // TArray<TPair<int32, int32>, TInlineAllocator<100, TMemStackAllocator<>>> BatchIndices; TArray<TPair<int32, int32>, TInlineAllocator<100> > BatchIndices; { SCOPED_NAMED_EVENT_TEXT("Slate::SortRenderBatches", FColor::Magenta);
Result
SceneRender section in stats keeps increasing
[Link Removed]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-97253 in the post.
1 |
Component | UE - Editor - UI Systems - Slate |
---|---|
Affects Versions | 4.25, 4.25.3 |
Target Fix | 4.25.4 |
Created | Aug 20, 2020 |
---|---|
Resolved | Sep 16, 2020 |
Updated | Apr 28, 2021 |