1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 03:39:55 +00:00

Move the destruction of global resources, being used by multiple documents, to the editor.

This commit is contained in:
cc9cii 2014-12-01 14:08:27 +11:00
parent 44b11163d1
commit 64e1594b41
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,8 @@
#include "editor.hpp"
#include <openengine/bullet/BulletShapeLoader.h>
#include <QApplication>
#include <QLocalServer>
#include <QLocalSocket>
@ -69,7 +71,10 @@ CS::Editor::Editor (OgreInit::OgreInit& ogreInit)
}
CS::Editor::~Editor ()
{}
{
// cleanup global resources used by OEngine
delete OEngine::Physic::BulletShapeManager::getSingletonPtr();
}
void CS::Editor::setupDataFiles (const Files::PathContainer& dataDirs)
{

View File

@ -6,8 +6,6 @@
#include <QApplication>
#include <QDesktopWidget>
#include <openengine/bullet/BulletShapeLoader.h>
#include "../../model/doc/documentmanager.hpp"
#include "../../model/doc/document.hpp"
#include "../../model/world/columns.hpp"
@ -220,8 +218,6 @@ void CSVDoc::ViewManager::removeDocAndView (CSMDoc::Document *document)
mDocumentManager.removeDocument(document);
(*iter)->deleteLater();
mViews.erase (iter);
// cleanup global resources used by OEngine
delete OEngine::Physic::BulletShapeManager::getSingletonPtr();
updateIndices();
return;