10-02-2013 06:51 AM
I use QmlDocument to create page and use it from C++. I do it in follow fashion:
mwmPage = 0;
QmlDocument *qml = QmlDocument::create(pageName).parent(this);
mwmPage = qml->createRootObject<Page>();
When corresponding page is popped, I delete it:
But it seems memory used by this page is not freed, so if w go through the pages long time, memory concumption increases. It seems we have some cache for pages which is not being freed.
A note regarding ownership of the objects associated with the QmlDocument object. By default the QmlDocument object is owned by the Application instance and will have the lifespan of the application. If the user wants to handle the lifespan the QObject::setParent method can be used to transfer the ownership. If the QmlDocument instance is only used for creating a single instance of the root object this root object can be set as a parent of theQmlDocument instance so the latter will be deleted when the node instance is deleted.
Does it mean that I have to set page as parent of QmlDocument? And how to do it correctly?
10-02-2013 08:14 AM
10-02-2013 12:00 PM
What do you mean under 'custom control'?
Yes, I have ListVews there with ArrayDataModels. And it seems they don't release memory.
I don't have controls, completely defined in C++.
It seems it is problem, described here: