diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-02-12 16:53:55 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-02-12 19:34:25 +0000 |
commit | 22d43f74e264626d0c28654c42c91839f9de45b5 (patch) | |
tree | 192521477a66fc06a78ab78b8c26e7cb851bf79b /src/quick/util | |
parent | 5ce922214c6ecfd6cb56ac939f31125c137f6cac (diff) |
Fix memory leak with ListModel.get
This is a regression introduced with commit
3cc589c98390992e3ee8a7970dc2913ea857d623, which in turn fixed a leak
with QV4::QObjectWrapper objects. Unfortunately the allocate() call into
the persistent (weak) value storage in the list model introduced a leak
of the weak value itself. This is fixed by replacing the free standing
weak value allocation with the use of the existing jsWrapper weak value
in the declarative data (QQmlData). That weak value is freed property in
the destroy() method of the QV4::QObjectWRapper. The extra QQmlData
allocation is hidden behind a unified allocation, similar to what we do
in void QQmlType::create(QObject **, void **, size_t) const.
Task-number: QTBUG-66189
Change-Id: I5351e3e484542709a6b210e84aa19b14d28e11ad
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/quick/util')
0 files changed, 0 insertions, 0 deletions