[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/krecipes/src/widgets
From:       Jason Kivlighn <confederacy2 () excite ! com>
Date:       2004-01-06 1:33:03
Message-ID: 20040106013303.402C293C8 () office ! kde ! org
[Download RAW message or body]

CVS commit by jkivlighn: 

Fix a memory leak


  M +3 -0      kremenu.cpp   1.22
  M +1 -0      paneldeco.cpp   1.4


--- kdenonbeta/krecipes/src/widgets/kremenu.cpp  #1.21:1.22
@@ -344,4 +344,5 @@ setCursor(QCursor(KCursor::handCursor())
 KreMenuButton::~KreMenuButton()
 {
+        if ( icon ) delete icon;
 }
 
@@ -515,4 +516,6 @@ if (!isShown()) return;
 void KreMenuButton::setIconSet(const QIconSet &is)
 {
+        if ( icon ) delete icon;
+
         icon = new QPixmap(is.pixmap(QIconSet::Small,QIconSet::Normal,QIconSet::On));
 }

--- kdenonbeta/krecipes/src/widgets/paneldeco.cpp  #1.3:1.4
@@ -107,4 +107,5 @@ if (title!=QString::null)
 TopDeco::~TopDeco()
 {
+        if ( icon ) delete icon;
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic