I'm creating the main inventory for my project and I'm starting to have some doubts about how to manage the objects. Right now there's three tabs: Inventory, Wish list and a Collection tab.All of these have their scenes with animated sprites panels and whatnot.Right now the inventory menu is created once the inventory is opened, I create not just the default tab but all the other tabs objects and then I just simple hide and show the current tab. I was wonder if it's better to have it always loaded or on the other hand if It could be better to create and destroy the objects of the tabs as they are opened and destroy them once the tab is changed.
For what I understand is a trade between cpu and memory, create requires more cpu process time and hiding requires memory. I would like to read if you have any rule you like to follow about when to chose one over the other, maybe you hide UI elements without logic but destroy complex entities?