summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-18 11:51:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-18 11:51:38 +0000
commit976508f30d0579e05d8ccd53be903b3cda89f508 (patch)
treea65671d1375d621110662adda8f0eb2c60053adf /plugins/SeenPlugin/src/main.cpp
parent00f7de90210080e231b2f8c2a0bf39c8b0a048ac (diff)
various memory allocation problems
git-svn-id: http://svn.miranda-ng.org/main/trunk@4090 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SeenPlugin/src/main.cpp')
-rw-r--r--plugins/SeenPlugin/src/main.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp
index 650382c8b6..9dd4e7ea1c 100644
--- a/plugins/SeenPlugin/src/main.cpp
+++ b/plugins/SeenPlugin/src/main.cpp
@@ -47,15 +47,10 @@ DBVTranslation idleTr[TRANSNUMBER]={
};
BOOL includeIdle;
-logthread_info **contactQueue = NULL;
-int contactQueueSize = 0;
+LIST<logthread_info> arContacts(16, LIST<logthread_info>::FTSortFunc(HandleKeySortT));
int MainInit(WPARAM wparam,LPARAM lparam)
{
- contactQueueSize = 16*sizeof(logthread_info *);
- contactQueue = (logthread_info **)malloc(contactQueueSize);
- memset(&contactQueue[0], 0, contactQueueSize);
- contactQueueSize = 16;
includeIdle = (BOOL )db_get_b(NULL,S_MOD,"IdleSupport",1);
HookEvent(ME_OPT_INITIALISE, OptionsInit);
@@ -84,7 +79,6 @@ int MainInit(WPARAM wparam,LPARAM lparam)
CallService("DBEditorpp/RegisterSingleModule", (WPARAM)S_MOD, 0);
db_set_s(NULL,"Uninstall",Translate("Last seen"),S_MOD);
-
if ( ServiceExists(MS_TIPPER_ADDTRANSLATION))
for (int i=0; i < TRANSNUMBER; i++)
CallService(MS_TIPPER_ADDTRANSLATION, 0, (LPARAM)&idleTr[i]);
@@ -119,6 +113,7 @@ extern "C" __declspec(dllexport) int Unload(void)
if (ehmissed)
UnhookEvent(ehmissed);
+ arContacts.destroy();
CloseHandle(g_hShutdownEvent);
UninitMenuitem();
return 0;