r18658 by jghali - fix memory leak detected by Visual Leak Detector
scribus-commit
scribus-commit at lists.scribus.net
Wed Dec 18 07:45:47 UTC 2013
Author: jghali
Date: Wed Dec 18 07:45:47 2013
New Revision: 18658
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18658
Log:
fix memory leak detected by Visual Leak Detector
Modified:
trunk/Scribus/scribus/ui/smtextstyles.cpp
trunk/Scribus/scribus/ui/stylemanager.cpp
Modified: trunk/Scribus/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18658&path=/trunk/Scribus/scribus/ui/smtextstyles.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.cpp (original)
+++ trunk/Scribus/scribus/ui/smtextstyles.cpp Wed Dec 18 07:45:47 2013
@@ -1810,7 +1810,8 @@
SMParagraphStyle::~SMParagraphStyle()
{
-
+ delete m_pwidget;
+ m_pwidget = 0;
}
/******************************************************************************/
Modified: trunk/Scribus/scribus/ui/stylemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18658&path=/trunk/Scribus/scribus/ui/stylemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/stylemanager.cpp Wed Dec 18 07:45:47 2013
@@ -1385,4 +1385,10 @@
m_prefs->set("InitY", y());
storeVisibility(this->isVisible());
storePosition();
-}
+
+ while (m_items.count() > 0)
+ {
+ StyleItem* styleItem = m_items.takeAt(0);
+ delete styleItem;
+ }
+}
More information about the scribus-commit
mailing list