~Application() { Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, this); if (mRoot) { if (mSceneMgr) mRoot->destroySceneManager(mSceneMgr); Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, this); delete mRoot; } }
RenderBoxWrap::~RenderBoxWrap() { FrameAdvise(false); mRenderBox->removeCamera(); mRenderBox->eventMouseDrag = nullptr; mRenderBox->eventMouseWheel = nullptr; mRenderBox->eventMouseButtonPressed = nullptr; mRenderBox->eventMouseButtonReleased = nullptr; mRenderBox->eventUpdateViewport = nullptr; Ogre::Root * root = Ogre::Root::getSingletonPtr(); if (root && mScene) root->destroySceneManager(mScene); }
void RenderBoxScene::destroy() { clearScene(); if (mCanvas) { frameAdvise(false); mCanvas->eventMouseDrag = nullptr; mCanvas->eventMouseButtonPressed = nullptr; mCanvas->eventMouseButtonReleased = nullptr; Ogre::Root* root = Ogre::Root::getSingletonPtr(); if (root && mScene) root->destroySceneManager(mScene); mScene= nullptr; } RenderBox::destroy(); }