In other words, is this OK?
Code: Select all
mRootWindow = mWinMgr.loadWindowLayout( (CEGUI::utf8*)"Intro.xml");
CEGUI::System::getSingleton().getGUISheet()->addChildWindow( mRootWindow );
... later in life ...
if ( mRootWindow )
CEGUI::WindowManager::getSingleton().destroyWindow( mRootWindow );
or should it really be done as so:
Code: Select all
... later in life ...
if ( mRootWindow )
{
CEGUI::System::getSingleton().getGUISheet()->removeChildWindow( mRootWindow );
CEGUI::WindowManager::getSingleton().destroyWindow( mRootWindow );
}