Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-112151

QQmlInstantiator leaks memory

    XMLWordPrintable

Details

    • 5db77fb40 (dev)

    Description

      Run the declarativeAssignViaAttached() test in tst_qquickvisualdatamodel.cpp and observe the leakage. This is because QQmlInstantiator insists on re-parenting the objects it receives from QQmlDelegateModel. QQmlDelegateModel, however, keeps some metadata on those objects and wants to release it when releasing the objects in its dtor. In particular scriptRef and contextData. Furthermore, QQmlInstantiator should run QQmlInstantiatorPrivate::clear() in its dtor so that any QQmlDelegateModel that may be supplying the objects knows it doesn't need them anymore.

      Attachments

        For Gerrit Dashboard: QTBUG-112151
        # Subject Branch Project Status CR V

        Activity

          People

            ulherman Ulf Hermann
            ulherman Ulf Hermann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes