Destroying Custom Windows
Posted: Sun Aug 03, 2008 06:37
Hello,
So I have created a few sub-classes of CEGUI::Window in the "proper" way (i.e. objects are created using the WindowManager::createWindow(...) function and a custom WindowFactory). This seems to work properly. However, the problem comes when I try to destroy it. The call to wmgr.destroyWindow(...) with this custom object seems to work fine, but then I get an access violation somewhere within CEGUI code after that. There is nothing of importance in the log file.
So I guess my question is this: is there some specific way to get it to destroy custom windows properly besides placing appropriate clean-up code in the destructor? If not, are there any ideas as to why it's doing this? Or is there other information that I can provide that might be helpful? As a side note, the destructor of this custom window never seems to be called, even after wmgr.destroyWindow(...) returns.
Thanks in advance!
Kevin
So I have created a few sub-classes of CEGUI::Window in the "proper" way (i.e. objects are created using the WindowManager::createWindow(...) function and a custom WindowFactory). This seems to work properly. However, the problem comes when I try to destroy it. The call to wmgr.destroyWindow(...) with this custom object seems to work fine, but then I get an access violation somewhere within CEGUI code after that. There is nothing of importance in the log file.
So I guess my question is this: is there some specific way to get it to destroy custom windows properly besides placing appropriate clean-up code in the destructor? If not, are there any ideas as to why it's doing this? Or is there other information that I can provide that might be helpful? As a side note, the destructor of this custom window never seems to be called, even after wmgr.destroyWindow(...) returns.
Thanks in advance!
Kevin