diff options
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index a8eeeeeddd..16c9dd7aa0 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -153,6 +153,10 @@ QQmlObjectCreator::~QQmlObjectCreator() if (ps) ps->d = 0; } + while (sharedState->componentAttached) { + QQmlComponentAttached *a = sharedState->componentAttached; + a->rem(); + } delete sharedState.data(); } } @@ -1253,6 +1257,11 @@ void QQmlObjectCreator::clear() while (!sharedState->allCreatedObjects.isEmpty()) delete sharedState->allCreatedObjects.pop(); + while (sharedState->componentAttached) { + QQmlComponentAttached *a = sharedState->componentAttached; + a->rem(); + } + phase = Done; } |