Reputation: 155
When handling screens in libGdx do you only need to dispose any ressources used within the screen (like Textures, Sounds, Sprites etc.) or do you also need to do anything with the screen object itself?
I searched a bit, but I couldn't really find an answer to this question.
I would assume the answer is no and the Garbage Collector will tend to the object like any other object, but I just want to be sure I'm not missing anything libGdx specific.
Upvotes: 1
Views: 172
Reputation: 844
You do not need to dispose Screen
objects in Libgdx. Screen
objects do not load any resources into memory, it is merely a Logical class that ApplicationAdapter
uses to delegate work to.
Look at this Memory Management wiki section, they provide a list of classes that require to be manually disposed.
Upvotes: 4