diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-07 16:13:46 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-07 16:13:46 (GMT) |
commit | 4aed0ed39de64990df28e72082cd79f799297369 (patch) | |
tree | 57c5b1e7c771a0fd5976a0ba0a51e131b4646707 /src/declarative/util | |
parent | 4cb429ce1e1ce5f1cecaceafbe74e6ebde2b6372 (diff) | |
parent | ef5eabdd58a9f584cff8b4e70b7eea583957114c (diff) | |
download | Qt-4aed0ed39de64990df28e72082cd79f799297369.zip Qt-4aed0ed39de64990df28e72082cd79f799297369.tar.gz Qt-4aed0ed39de64990df28e72082cd79f799297369.tar.bz2 |
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qdeclarativestate.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 9f56ccb..ee3d06b 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -173,6 +173,18 @@ QDeclarativeState::~QDeclarativeState() Q_D(QDeclarativeState); if (d->group) d->group->removeState(this); + + /* + destroying an active state does not return us to the + base state, so we need to clean up our revert list to + prevent leaks. In the future we may want to redconsider + this overall architecture. + */ + for (int i = 0; i < d->revertList.count(); ++i) { + if (d->revertList.at(i).binding()) { + d->revertList.at(i).binding()->destroy(); + } + } } /*! |