summaryrefslogtreecommitdiff
path: root/src/corelib/statemachine
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-21 15:41:16 +0200
committerKent Hansen <khansen@trolltech.com>2009-07-21 15:48:15 +0200
commit641ba0bb2c144a4bef25982d90ac49d9af354202 (patch)
treea9a733d58c51751c48f1c6862079951aceeae6b6 /src/corelib/statemachine
parentdcb735f92d87aacade6aa65079fe3da06efca553 (diff)
downloadqt4-tools-641ba0bb2c144a4bef25982d90ac49d9af354202.tar.gz
Fix memory leak with wrapped events
Reviewed-by: Eskil Abrahamsen Blomfeldt
Diffstat (limited to 'src/corelib/statemachine')
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index bf3ee3107a..a00e7e1732 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -2155,6 +2155,8 @@ QSignalEvent::~QSignalEvent()
Constructs a new QWrappedEvent object with the given \a object
and \a event.
+
+ The QWrappedEvent object takes ownership of \a event.
*/
QWrappedEvent::QWrappedEvent(QObject *object, QEvent *event)
: QEvent(QEvent::Wrapped), m_object(object), m_event(event)
@@ -2166,6 +2168,7 @@ QWrappedEvent::QWrappedEvent(QObject *object, QEvent *event)
*/
QWrappedEvent::~QWrappedEvent()
{
+ delete m_event;
}
/*!