r18645 by jghali - fix memory leak detected by Visual Leak Detector
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 14 21:20:06 UTC 2013
Author: jghali
Date: Sat Dec 14 21:20:06 2013
New Revision: 18645
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18645
Log:
fix memory leak detected by Visual Leak Detector
Modified:
trunk/Scribus/scribus/undomanager.cpp
Modified: trunk/Scribus/scribus/undomanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18645&path=/trunk/Scribus/scribus/undomanager.cpp
==============================================================================
--- trunk/Scribus/scribus/undomanager.cpp (original)
+++ trunk/Scribus/scribus/undomanager.cpp Sat Dec 14 21:20:06 2013
@@ -50,6 +50,18 @@
*/
struct TransactionData : public Transaction::TransactionStateBase
{
+ TransactionData() {
+ transactionObject = 0;
+ transactionState = 0;
+ }
+
+ ~TransactionData() {
+ if (transactionObject)
+ delete transactionObject;
+ if (transactionState)
+ delete transactionState;
+ }
+
int stackLevel;
UndoManager* UM;
UndoObject* transactionObject; // will be DummyUndoObject
More information about the scribus-commit
mailing list