summaryrefslogtreecommitdiff
path: root/examples/qml/referenceexamples/adding/main.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-03-20 16:42:20 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-03-29 18:07:26 +0100
commit5db77fb406bb36a27de1ad2e3390720411c833f9 (patch)
treef3ab9cdd5e8c693c22e2b3357967e50d23b53636 /examples/qml/referenceexamples/adding/main.cpp
parent6913084b0d649b78dc10b80cd9b8d77d51a50c8b (diff)
downloadqtdeclarative-5db77fb406bb36a27de1ad2e3390720411c833f9.tar.gz
QQmlInstantiator: Avoid memory leaks
The instance model really wants to manage its objects' life cycle. Therefore, renounce ownership of the objects when the instantiator is cleared, so that it can do its work. Also, clear() on destruction in order to avoid dangling objects. Fixes: QTBUG-112151 Change-Id: Ieed0108d3c7ca3a47f3b5576e500d6cf3cfcdda4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/qml/referenceexamples/adding/main.cpp')
0 files changed, 0 insertions, 0 deletions