Destroy context when unloading plugins.

This commit is contained in:
dfighter1985 2014-06-09 17:40:06 +02:00
parent b7a86fd998
commit 4f09537f31
12 changed files with 36 additions and 0 deletions

View file

@ -44,6 +44,9 @@ namespace BNPManager
}
qDeleteAll(m_autoReleaseObjects);
m_autoReleaseObjects.clear();
delete m_libContext;
m_libContext = NULL;
}
bool BNPManagerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -44,6 +44,9 @@ DispSheetIdPlugin::~DispSheetIdPlugin()
QAction *a = menuManager->action( "SheetIdView" );
menuManager->unregisterAction( "SheetIdView" );
delete a;
delete m_LibContext;
m_LibContext = NULL;
}
bool DispSheetIdPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -39,6 +39,9 @@ GeorgesEditorPlugin::~GeorgesEditorPlugin()
}
qDeleteAll(m_autoReleaseObjects);
m_autoReleaseObjects.clear();
delete m_libContext;
m_libContext = NULL;
}
bool GeorgesEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -37,6 +37,9 @@ namespace GUIEditor
qDeleteAll(m_autoReleaseObjects);
m_autoReleaseObjects.clear();
delete m_libContext;
m_libContext = NULL;
}
bool GUIEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -39,6 +39,9 @@ LandscapeEditorPlugin::~LandscapeEditorPlugin()
}
qDeleteAll(m_autoReleaseObjects);
m_autoReleaseObjects.clear();
delete m_libContext;
m_libContext = NULL;
}
bool LandscapeEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -62,6 +62,9 @@ namespace Plugin
NLMISC::AssertLog->removeDisplayer(m_displayer);
NLMISC::InfoLog->removeDisplayer(m_displayer);
delete m_displayer;
delete m_libContext;
m_libContext = NULL;
}
bool CLogPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -30,6 +30,9 @@ MissionCompilerPlugin::~MissionCompilerPlugin()
}
qDeleteAll(m_autoReleaseObjects);
m_autoReleaseObjects.clear();
delete m_LibContext;
m_LibContext = NULL;
}
bool MissionCompilerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -23,6 +23,9 @@ ObjectViewerPlugin::~ObjectViewerPlugin()
qDeleteAll(_autoReleaseObjects);
_autoReleaseObjects.clear();
Modules::release();
delete _LibContext;
_LibContext = NULL;
}
bool ObjectViewerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -45,6 +45,9 @@ SheetBuilderPlugin::~SheetBuilderPlugin()
QAction *a = menuManager->action( "SheetBuilder" );
menuManager->unregisterAction( "SheetBuilder" );
delete a;
delete m_LibContext;
m_LibContext = NULL;
}
bool SheetBuilderPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -42,6 +42,9 @@ TileEditorPlugin::~TileEditorPlugin()
}
qDeleteAll(m_autoReleaseObjects);
m_autoReleaseObjects.clear();
delete m_LibContext;
m_LibContext = NULL;
}
bool TileEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -48,6 +48,9 @@ TranslationManagerPlugin::~TranslationManagerPlugin()
}
qDeleteAll(_autoReleaseObjects);
_autoReleaseObjects.clear();
delete _LibContext;
_LibContext = NULL;
}
bool TranslationManagerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)

View file

@ -43,6 +43,9 @@ WorldEditorPlugin::~WorldEditorPlugin()
}
qDeleteAll(m_autoReleaseObjects);
m_autoReleaseObjects.clear();
delete m_libContext;
m_libContext = NULL;
}
bool WorldEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)