summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-18 16:23:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-18 16:23:54 +0000
commit5b2cd5b8dc67bd27d8c4e877e69057f4e0fb2a24 (patch)
tree6b3f1c5481b60f86270474e93fcadec71e059b24 /src
parente6615c0f1818ef8f93994d8add1d194060f52612 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16713 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/clistgroups.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp
index a1eef33b00..c5289a1f57 100644
--- a/src/mir_app/src/clistgroups.cpp
+++ b/src/mir_app/src/clistgroups.cpp
@@ -32,7 +32,11 @@ struct CGroupInternal
groupName(mir_tstrdup(_name))
{}
- int groupId;
+ ~CGroupInternal()
+ { mir_free(groupName);
+ }
+
+ int groupId;
TCHAR *groupName;
void save()
@@ -252,7 +256,6 @@ MIR_APP_DLL(int) Clist_GroupDelete(MGROUP hGroup)
const CLISTGROUPCHANGE grpChg = { sizeof(grpChg), pGroup->groupName+1, NULL };
NotifyEventHooks(hGroupChangeEvent, 0, (LPARAM)&grpChg);
- mir_free(pGroup->groupName);
delete(pGroup);
return 0;
}
@@ -521,10 +524,9 @@ int InitGroupServices(void)
void UninitGroupServices(void)
{
- for (int i = 0; i < arByIds.getCount(); i++) {
- mir_free(arByIds[i]->groupName);
+ for (int i = 0; i < arByIds.getCount(); i++)
delete arByIds[i];
- }
+
arByIds.destroy();
arByName.destroy();
}