When to destroy?

cass

22-02-2010 16:32:51

Hi

How does MyGUI's internal memory management work. Should I always destroy() all widgets that was created or is it same to assume that the shutdown() methods will clean up the widgets.

Also what is the best way to switch between GUI's? In other words, let's say I have a main screen with my main menu, and sub-screen, each with their own sets of elements. I do not want to waste unnecessary processing or memory.

Altren

23-02-2010 02:23:48

How does MyGUI's internal memory management work. Should I always destroy() all widgets that was created or is it same to assume that the shutdown() methods will clean up the widgets.MyGUI destroys everything that you created through MyGUI API when you call shutdown.
Also what is the best way to switch between GUI's? In other words, let's say I have a main screen with my main menu, and sub-screen, each with their own sets of elements. I do not want to waste unnecessary processing or memory.Well, you can keep mast of your widgets hidden and there is no big reason to destroy them if there is only one copy (like main menu window). And if you create windows dynamically (for example new window for each figure in game) then better to create and destroy when you don't need it anymore.

cass

23-02-2010 04:45:11

Thank you!