Sharing LibGDX Assets Across Screens Without Memory Leaks
Own LibGDX assets in a single AssetManager held by the Game class, not by individual Screens, so shared textures and skins survive screen transitions without leaking native memory.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Own LibGDX assets in a single AssetManager held by the Game class, not by individual Screens, so shared textures and skins survive screen transitions without leaking native memory.
I'm designing a libGDX game (assume 1.12.x, desktop and Android targets) that uses a single shared AssetManager across multiple Screen implementations: a loading screen, a menu screen, and several level screens. The loading screen polls update() and reads getProgress() to drive a progress bar, which works fine. The unresolved part is the boundary between the