From d7844d0b4c8453291bad5c9a02d462b7d0860533 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Jun 2015 21:20:53 +0000 Subject: memleak in destroying array of extra icons git-svn-id: http://svn.miranda-ng.org/main/trunk@14063 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/extraicons/extraicons.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/modules/extraicons') diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp index 4df022e512..be02a26b87 100644 --- a/src/modules/extraicons/extraicons.cpp +++ b/src/modules/extraicons/extraicons.cpp @@ -534,6 +534,12 @@ void LoadExtraIconsModule() void UnloadExtraIconsModule(void) { - for (int i=0; i < registeredExtraIcons.getCount(); i++) + for (int k = 0; k < extraIconsBySlot.getCount(); k++) { + ExtraIcon *extra = extraIconsBySlot[k]; + if (extra->getType() == EXTRAICON_TYPE_GROUP) + delete extra; + } + + for (int i = 0; i < registeredExtraIcons.getCount(); i++) delete registeredExtraIcons[i]; } -- cgit v1.2.3