From 5b2cd5b8dc67bd27d8c4e877e69057f4e0fb2a24 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Apr 2016 16:23:54 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16713 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/clistgroups.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') 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(); } -- cgit v1.2.3