Description

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);


Steps to Reproduce
  1. Open attached project on 4.25.3 engine retainerboxmemory.zip[Image Removed]
  2. Build package for win64
  3. Launch the packaged game with -LLM command-line option
  4. After launching the game, enter "stat LLMFULL" console command
  5. see stats

Result

SceneRender section in stats keeps increasing

 

RetainerBoxMemoryLeak.mp4[Image Removed]

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-97253 in the post.

1
Login to Vote

Fixed
ComponentTools - Slate
Affects Versions4.254.25.3
Target Fix4.25.4
Fix Commit14175502
CreatedAug 20, 2020
ResolvedSep 16, 2020
UpdatedSep 16, 2020