Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.0 Beta1, 6.2.8, 6.3.0 Alpha, 6.4.3, 6.5.0, 6.5, 6.6.0
-
5.15.2
-
-
16fc4cf366961e50b5bdf29af5c0546fe3c69495 (qt/qtdeclarative/dev) d30fad2a71aa3dab8e858b5fd421f8103b1bdcac (qt/qtdeclarative/6.2), 718f3469f (dev), 749470e6b (tqtc/lts-6.2), 389110675 (6.5), a22ea1619 (6.4)
Description
The shown ListModel doesn't keep "o" alive, which is a QObject whose ownership is JavaScriptOwnership. I observe that "gc()" yields to a destructor call of the object that "o" references.
Please use the attached "gc" tarball that contains an example project. Entering Code doesn't appear to work in the Description.
Attachments
Issue Links
- is duplicated by
-
QTBUG-99279 listModel.set() leads to crash in some situation.
- Closed
- relates to
-
QTBUG-95895 REG 5.15 -> 6.2: destroy() does not destroy objects after appending listModel.
- Closed
-
QTBUG-80589 Assigning a new QObject w/o a parent to a C++ property through QML doesn't prevent it from being garbage collected
- Closed
For Gerrit Dashboard: QTBUG-91390 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
354140,7 | qqmllistmodel: Fix QObjects getting garbage collected | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
354400,2 | qqmllistmodel: Fix QObjects getting garbage collected | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
456771,4 | ListModel: Use PersistentValue to keep track of objects | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
457053,2 | ListModel: Use PersistentValue to keep track of objects | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
457054,3 | ListModel: Use PersistentValue to keep track of objects | 6.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
457121,3 | ListModel: Use PersistentValue to keep track of objects | tqtc/lts-6.2 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |