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

StackView documentation don't explain memory management and is confusing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.11.0 Alpha
    • Fix Version/s: 5.11.0 Beta 2
    • Component/s: Quick: Controls 2
    • Labels:
      None
    • Commits:
      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

            Assignee:
            mitch_curtis Mitch Curtis
            Reporter:
            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