Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background images loaded at startup can't be collected by GC afterwards #57

Open
Snowball2012 opened this issue Apr 26, 2022 · 0 comments

Comments

@Snowball2012
Copy link

Snowball2012 commented Apr 26, 2022

Hello,

FAsyncLoadingScreenModule::StartupModule calls SetupLoadingScreen(Settings->StartupLoadingScreen) at module startup time. That happens while disregard for gc pool is still open, so all UObjects loaded at this stage (e.g. background textures in SBackgroundWidget) can't be released by gc later and can consume a portion of gpu memory as long as the module is loaded (entire process lifetime basically). This doesn't happen with other loading screens because they are constructed much later, after CloseDisregardForGC is called.

You can see this behaviour if you specify some texture in BackgroundSettings for startup screen and call obj refs name= <TextureName> after the game has loaded. The background texture will be marked as root and thus won't be collected by GC:

(root) (standalone)  MetaData /Game/<TexturePath>
 -> UObject* UObject::Outer = (root)  Package /Game/<TexturePath>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant