Loader Element
-
When using a loader element to navigate to a new page is the page that has the loader event on it still loaded? In other words, if I just keep doing loader events to navigate from page to page will I run into memory issues eventually?
-
"To unload the currently loaded item, set this property to an empty string, or set sourceComponent to undefined."
see more info here: "Loader":http://doc.qt.nokia.com/4.7/qml-loader.html#source-prop
Not sure if you change the source to a different qml file, if it unloads the previous item. maybe someone from nokia stuff can answer that.
-
It would be great information to know.
-
I found that it does introduce memory problems. If anyone knows of an unload that would be the preferable way to fix it. Otherwise, would this be better:
@Connections {
target: myLoader.item
onMessage: console.log(msg)
}@with the changePage() call?
-
-
Setting the source to a new url will cause the item created by the previous url to be deleted (it uses deleteLater(), so it's possible that if you did this in a loop, you would see memory increase until the event loop was entered again).
I've updated the docs to clarify this.
Regards,
Michael -
Thanks for the help.