diff options
author | Liang Jian <jianliang79@gmail.com> | 2014-03-14 10:25:40 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-14 07:55:47 +0100 |
commit | 8dd85a0a8ba346e960d568c1ad03dad5df2a804a (patch) | |
tree | 0b4f075e5adcd3a153d8312f78c4ca2bf4e3e06e /src/qml/qml | |
parent | bbffec3effe533dd8ceb99b2d8c299fc070c88c6 (diff) |
Fix QQmlContextData object leak
Mark the QQmlContextData object created in QmlContextWrapper::urlScope()
as owned by its QmlContextWrapper to prevent leak.
Change-Id: Ie7afee676e0745a78ef4f3a56984f52f638227e0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlcontextwrapper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index e72e90296f..07ef86e16f 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -94,7 +94,7 @@ ReturnedValue QmlContextWrapper::urlScope(QV8Engine *v8, const QUrl &url) context->isInternal = true; context->isJSContext = true; - Scoped<QmlContextWrapper> w(scope, new (v4->memoryManager) QmlContextWrapper(v8, context, 0)); + Scoped<QmlContextWrapper> w(scope, new (v4->memoryManager) QmlContextWrapper(v8, context, 0, true)); w->isNullWrapper = true; return w.asReturnedValue(); } |