Page 1 of 1

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

Posted: Mon Mar 16, 2009 01:37
by yllfever
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?

Posted: Mon Mar 16, 2009 10:21
by scriptkid
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.

Posted: Tue Mar 17, 2009 03:01
by yllfever
Thanks a lot.
:)