diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-21 13:41:16 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-21 13:48:15 (GMT) |
commit | 641ba0bb2c144a4bef25982d90ac49d9af354202 (patch) | |
tree | a9a733d58c51751c48f1c6862079951aceeae6b6 /src/corelib/statemachine | |
parent | dcb735f92d87aacade6aa65079fe3da06efca553 (diff) | |
download | Qt-641ba0bb2c144a4bef25982d90ac49d9af354202.zip Qt-641ba0bb2c144a4bef25982d90ac49d9af354202.tar.gz Qt-641ba0bb2c144a4bef25982d90ac49d9af354202.tar.bz2 |
Fix memory leak with wrapped events
Reviewed-by: Eskil Abrahamsen Blomfeldt
Diffstat (limited to 'src/corelib/statemachine')
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index bf3ee31..a00e7e1 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; } /*! |