Fix memory leak on theme changes.

svn path=/trunk/KDE/kdelibs/; revision=961369
This commit is contained in:
Rob Scheepmaker 2009-04-30 00:46:57 +00:00
parent af3c1f881d
commit 6bb7eb1dee
2 changed files with 5 additions and 3 deletions

View File

@ -144,10 +144,11 @@ void ExtenderGroup::collapseGroup()
ExtenderGroupPrivate::ExtenderGroupPrivate(ExtenderGroup *group)
: collapsed(true),
: q(group),
svg(new Svg(group)),
collapsed(true),
autoHide(true)
{
q = group;
}
ExtenderGroupPrivate::~ExtenderGroupPrivate()
@ -183,7 +184,6 @@ void ExtenderGroupPrivate::removeItemFromGroup(Plasma::ExtenderItem *item)
void ExtenderGroupPrivate::themeChanged()
{
Plasma::Svg *svg = new Plasma::Svg(q);///Who deletes the svg? (Looks like a memory hog/leak on multiple theme changes)
svg->setImagePath("widgets/configuration-icons");
svg->resize();

View File

@ -25,6 +25,7 @@ namespace Plasma
class ExtenderGroup;
class ExtenderItem;
class Svg;
class ExtenderGroupPrivate
{
@ -37,6 +38,7 @@ class ExtenderGroupPrivate
void themeChanged();
Plasma::ExtenderGroup *q;
Plasma::Svg *svg;
bool collapsed;
bool autoHide;
};