diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-12-07 22:24:32 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-12-07 22:24:32 (GMT) |
commit | 29e5c9b27302e455b1ae9d324687ded3a40066d2 (patch) | |
tree | 33ba4ae138dc8842bb9879fb464265cf106552a4 /src | |
parent | 55a3fda3baf545cc7fbfa6b2c00705be40a7319b (diff) | |
download | Qt-29e5c9b27302e455b1ae9d324687ded3a40066d2.zip Qt-29e5c9b27302e455b1ae9d324687ded3a40066d2.tar.gz Qt-29e5c9b27302e455b1ae9d324687ded3a40066d2.tar.bz2 |
Fix leaks.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsloader.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp index 86239cf..bb1020c 100644 --- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp @@ -263,6 +263,7 @@ void QmlGraphicsLoaderPrivate::_q_sourceLoaded() QObject *obj = component->create(ctxt); if (obj) { + ctxt->setParent(obj); item = qobject_cast<QmlGraphicsItem *>(obj); if (item) { item->setParentItem(q); @@ -271,6 +272,7 @@ void QmlGraphicsLoaderPrivate::_q_sourceLoaded() } } else { delete obj; + delete ctxt; source = QUrl(); } emit q->sourceChanged(); diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 3e7ac8e..4709b05 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -200,6 +200,8 @@ QmlEnginePrivate::~QmlEnginePrivate() namedNodeMapClass = 0; delete sqlQueryClass; sqlQueryClass = 0; + delete globalClass; + globalClass = 0; for(int ii = 0; ii < bindValues.count(); ++ii) clear(bindValues[ii]); |