diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-08 20:55:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-08 20:55:34 +0000 |
commit | a4498f183c28fb10af04e94d1236b795b06bf7a5 (patch) | |
tree | f0aba6d3cbfd14ba41e53b7161e020af9200dc09 /src/modules/database/dbintf.cpp | |
parent | 7e2a1c233ab2eac8e3f65dd1ee1647b336ef588c (diff) |
some memory leak fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@3925 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/database/dbintf.cpp')
-rw-r--r-- | src/modules/database/dbintf.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/database/dbintf.cpp b/src/modules/database/dbintf.cpp index 70d033c50c..e95caff6c4 100644 --- a/src/modules/database/dbintf.cpp +++ b/src/modules/database/dbintf.cpp @@ -232,8 +232,9 @@ static INT_PTR srvDestroyInstance(WPARAM wParam,LPARAM lParam) {
MIDatabase* pDb = (MIDatabase*)lParam;
if (pDb != NULL) {
- delete pDb->m_cache;
+ MDatabaseCache *pCache = (MDatabaseCache*)pDb->m_cache;
pDb->m_cache = NULL;
+ delete pCache;
}
return 0;
}
@@ -284,3 +285,8 @@ int LoadDbintfModule() CreateServiceFunction(MS_DB_DESTROY_INSTANCE, srvDestroyInstance);
return 0;
}
+
+void UnloadDbintfModule()
+{
+ arDbPlugins.destroy();
+}
|