summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_treelist.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-02 20:20:47 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-02 20:20:47 +0000
commit8712f0c3591941711f8407fc069a1fbd98efbd65 (patch)
treec75825bc3d05f543e622770c684e09113ddbeb79 /protocols/JabberG/src/jabber_treelist.cpp
parentad5dee8e7d01ea0cd2b96a7f46e1f6fc9692825a (diff)
added destructor LIST::~LIST, that calls destroy() automatically.
thus manual call of destroy() might be removed from: - class destructors; - Unload() plugin's functions (for global data); - local (auto) variables in functions finalizations git-svn-id: http://svn.miranda-ng.org/main/trunk@7467 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_treelist.cpp')
-rw-r--r--protocols/JabberG/src/jabber_treelist.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_treelist.cpp b/protocols/JabberG/src/jabber_treelist.cpp
index 60b9e92089..9fc000cf3f 100644
--- a/protocols/JabberG/src/jabber_treelist.cpp
+++ b/protocols/JabberG/src/jabber_treelist.cpp
@@ -49,13 +49,11 @@ struct TTreeList_ItemInfo
flags(0), indent(0), sortIndex(0), iIcon(0), iOverlay(0), data(0) {}
~TTreeList_ItemInfo()
{
- int i;
- for (i = text.getCount(); i--;)
+ for (int i = text.getCount(); i--;)
mir_free(text[i]);
- text.destroy();
- for (i = subItems.getCount(); i--;)
- delete subItems[i];
- subItems.destroy();
+
+ for (int k = subItems.getCount(); k--;)
+ delete subItems[k];
}
};