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

StackView documentation don't explain memory management and is confusing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.0 Beta 2
    • 5.11.0 Alpha
    • Quick: Controls 2
    • None
    • 3995d587d62dfa9c6aa554180cba9b0a6a0f3f87

    Description

      It would be useful for users to explain the memory management involved in StackView.  In particular the life of the item returned by the push and pop methods.

      From experimentations, I discovered the item returned by pop seems to be automatically destroyed under hood.

      Unfortunately I could not found an explanation in the C++ code, I guess it is done in the javascript engine.

      Moreover the documentation is confusing, see https://doc-snapshots.qt.io/qt5-5.11/qml-qtquick-controls2-stackview.html removed signal, since this example suggests the memory management is done by the user:

      Item {
        StackView.onRemoved: destroy() // Will be destroyed sometime after this call.
      }
      

       

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            fabricesalvaire fabrice salvaire
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes