truong-bui / AsyncLoadingScreen

Async Loading Screen is a free and open-source plugin for Unreal Engine. Async Loading Screen allows you to easily configure a Loading Screen System in the project settings, and automatically add a Loading Screen whenever you open a new level, without Level Streaming.
https://www.unrealengine.com/marketplace/en-US/product/async-loading-screen
MIT License
787 stars 99 forks source link

Memory leak while allowing player to wait in loading screen on UE 4.25.4 #20

Closed terishrimp closed 3 years ago

terishrimp commented 3 years ago

Hey Truong, these settings will cause a Windows 64-bit build to leak memory if you stay on the loading screen:

I did a memreport both before and after the loading screen and noticed this difference: unknown

truong-bui commented 3 years ago

Hi @terishrimp, thank you for reporting bug, I'll investigate this issue.

truong-bui commented 3 years ago

@terishrimp, you shouldn't worry about the memory leak in Async Loading Screen. All the pointers in the plugin code are shared pointers, which will be garbage collected in the end anyway. There is no manual memory allocation in the plugin source code, I think it may take an amount of time for GC to collect all the Slate pointers. However, if there is a memory leak in the Slate module or MoviePlayer module, it's out of my ability.

terishrimp commented 3 years ago

Hey @truong-bui, fair enough. I have tried allowing the level proceeding the loading screen ample time for GC to see if the memory decreases but it doesn't. Thanks for looking into it! I'll go ahead and do further research myself.