Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.0 Alpha
-
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.
}