diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-04 19:11:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-04 19:11:17 +0000 |
commit | d7f143dba9e53347a1d7897bcd3989751c7f45f8 (patch) | |
tree | bb464bed05487cb48d2221dee5840d943fa0b8d1 /src/modules/plugins | |
parent | 3f918fb53343d815ba8736735d1c0beea2359b15 (diff) |
wiping objects during dynamic plugin unload
git-svn-id: http://svn.miranda-ng.org/main/trunk@762 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/plugins')
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 493c40bf10..237d2140b3 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -66,17 +66,14 @@ MuuidReplacement pluginDefault[] = static BOOL bModuleInitialized = FALSE;
-TCHAR mirandabootini[MAX_PATH];
+TCHAR mirandabootini[MAX_PATH];
static DWORD mirandaVersion;
static int serviceModeIdx = -1;
-static pluginEntry * pluginListSM;
-static pluginEntry * pluginListDb;
-static pluginEntry * pluginListUI;
-static pluginEntry * pluginList_freeimg;
-static pluginEntry * pluginList_crshdmp;
static HANDLE hPluginListHeap = NULL;
static int askAboutIgnoredPlugins;
+static pluginEntry *pluginListSM, *pluginListDb, *pluginListUI, *pluginList_freeimg, *pluginList_crshdmp;
+
int InitIni(void);
void UninitIni(void);
@@ -286,6 +283,19 @@ void Plugin_Uninit(pluginEntry* p, bool bDynamic) KillModuleEventHooks(p->bpi.hInst);
KillModuleServices(p->bpi.hInst);
+ if (bDynamic) {
+ int hLangpack = Langpack_GetPluginHandle(p->bpi.pluginInfo);
+ if (hLangpack != 0) {
+ KillModuleMenus(hLangpack);
+ KillModuleFonts(hLangpack);
+ KillModuleColours(hLangpack);
+ KillModuleEffects(hLangpack);
+ KillModuleIcons(hLangpack);
+ KillModuleHotkeys(hLangpack);
+ KillModuleSounds(hLangpack);
+ }
+ }
+
FreeLibrary(p->bpi.hInst);
ZeroMemory(&p->bpi, sizeof(p->bpi));
}
|