[Solved]Should I destroy all sub-windows recursively?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

yllfever
Just popping in
Just popping in
Posts: 8
Joined: Mon Mar 09, 2009 08:21

[Solved]Should I destroy all sub-windows recursively?

Postby yllfever » Mon Mar 16, 2009 01:37

Hello, every one.
I have a question on destroying windows. Please help me.
Initially, I created some windows.
But when some event occured, I do not need those windows anymore.

In order to release memory.
Should i recursively call the destroy() methods of every sub-windows,
or just call the destroy() of the root window of the sub-tree?
Last edited by yllfever on Tue Mar 17, 2009 03:03, edited 1 time in total.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Mon Mar 16, 2009 10:21

Hi,

Cegui will take care or deleting child- and automatic windows, so deleting the 'root' is enough. Make sure to destroy it through the WindowManager; don't call 'delete' on the window.

HTH.
Check out my released snake game using Cegui!

yllfever
Just popping in
Just popping in
Posts: 8
Joined: Mon Mar 09, 2009 08:21

Postby yllfever » Tue Mar 17, 2009 03:01

Thanks a lot.
:)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests