The engine does not free the LevelRenderAssetManagers array elements in FRenderAssetStreamingManager when changing lighting scenarios.
Following code can avoid this issue.
void FRenderAssetStreamingManager::PropagateLightingScenarioChange() { FScopeLock ScopeLock(&CriticalSection); QUICK_SCOPE_CYCLE_COUNTER(STAT_FRenderAssetStreamingManager_PropagateLightingScenarioChange); // Note that dynamic components don't need to be handled because their renderstates are updated, which triggers and update. TArray<ULevel*, TInlineAllocator<32> > Levels; for (FLevelRenderAssetManager* LevelManager : LevelRenderAssetManagers) { if (LevelManager!=nullptr) { Levels.Push(LevelManager->GetLevel()); LevelManager->Remove(nullptr); delete LevelManager; // add this line } }
Result:
StreamingManager memory amount keeps increasing.
The screenshot below is from an hour after launch.
[Image Removed]
Why does the REMOVE method of map container remove elements have memory leaks?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How does TextureRenderTarget2D get TArray<uint8> type data?
How to delete some elements correctly when deleting an array loop?
How do I set a material as a post-processing material?
What is the difference between Camera and CineCamera?
UMG RichText not appear image when packaged
How would I go about lerping the rotation instead of it snapping when turning (pls dont sue me epic)
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-97571 in the post.
1 |
Component | UE - Rendering Architecture - RHI |
---|---|
Affects Versions | 4.24, 4.25 |
Target Fix | 4.26 |
Created | Aug 26, 2020 |
---|---|
Resolved | Aug 28, 2020 |
Updated | Jul 23, 2021 |