Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Rings:2-TestDVD
libqt5-qtdeclarative
QML-Clear-weak-references-on-Object-destruction...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File QML-Clear-weak-references-on-Object-destruction.patch of Package libqt5-qtdeclarative
From 4d375f3f2b95bfcb322402df3525db6cc7a723ce Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@digia.com> Date: Tue, 4 Oct 2016 11:42:10 +0200 Subject: QML: Clear weak references on Object destruction for C++-owned QObjects Otherwise a re-use of the C++-owned QObject will have a back reference to a possibly GCed QV4::QObjectWrapper, which results in exciting behavior. Task-number: QTBUG-46263 Change-Id: Iff0e36f9e67c01abd02cfb5a89605d0f26ddb0de Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> --- src/qml/jsruntime/qv4qobjectwrapper.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 246df4c..77de84b 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -1036,6 +1036,10 @@ void QObjectWrapper::destroyObject(bool lastCall) delete h->object; else h->object->deleteLater(); + } else { + // If the object is C++-owned, we still have to release the weak reference we have + // to it. + ddata->jsWrapper.clear(); } } } -- cgit v1.0-4-g1e03
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor