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

Clarify if and when data is copied when passed between C++ and QML/JS

XMLWordPrintable

      When passing a QList<ValueType> from C++ to QML, does the list get copied? We don't eagerly construct a JS array in QML, so one should probably get a QV4::SequenceWrapper wrapping the QList, and that will use implicit sharing, so the QList is also not copied.

      But are there scenarios where this doesn't work? What happens on the other way around (Java array with value types sent to C++ through an invokable)?

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

            qtqmlteam Qt Qml Team User
            vhilshei Volker Hilsheimer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes