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

QQmlMetaType::registerInternalCompositeType() leaks

    XMLWordPrintable

Details

    • 707f78086982f15dc4b2d6129f0b983d01cb9626 (qt/qtdeclarative/dev)

    Description

      Since the adaptation to the new metatype system we create the meta types on the heap, but never delete them:

      CompositeMetaTypeIds QQmlMetaType::registerInternalCompositeType(const QByteArray &className)
      {
          QByteArray ptr = className + '*';
          QByteArray lst = "QQmlListProperty<" + className + '>';
      
          QMetaType ptr_type(new QQmlMetaTypeInterface<QObject*>(ptr));
          QMetaType lst_type(new QQmlMetaTypeInterface<QQmlListProperty<QObject>>(lst));
      
          QQmlMetaTypeDataPtr data;
          data->qmlLists.insert(lst_type.id(), ptr_type.id());
      
          return {ptr_type, lst_type};
      }
      

      This makes it impossible to verify that other changes don't leak.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes