Dynamic lifecycle of Qt Quick objects
I understand that you can permanently create a QML object as a sub-element by describing it inside another object, or by describing it in a qml file and creating it as a property of the parent object.
There is one more way to create a dynamic object – you can do the following:
My question is this, if you declare a page using Qt.resolvedUrl, what is its lifetime/who is its owner? Can it be deleted – for example if you pop it off the pagestack is it automatically deleted?
The concept of interface is based on stack. When you start an app you got only a start page. When you enter subpage it is pushed in stack and when you go back it is poped from stack and memory is released. And when you enter in subpage again, new instance is created( old one has been removed by pop() ). So most of time you’ll got only a few pages in stack.