Hello,
A couple quick questions:
- I am using Components to load .qml files as pages using navigationStack.push(). Do I understand correctly that Components are not loaded until called? So if I have a number of Components, I can add them all to main.qml as they won’t be loaded into memory until navigationStack.push() is called on them? Or, does Felgo load the Components added to my main.qml file when the app is first run?
For example: Main.qml:import QtQml 2.2 import QtQuick 2.9 import Felgo 3.0 import QtQuick.LocalStorage 2.0 App { id: app Storage { id: myLocalStorage } Navigation { MainMain {} // Home page NavigationPage1 {} NavigationPage2 {} } Component { id: pageOne One {} } Component { id: pageTwo Two {} } Component { id: pageThree Three {} } Component { id: pageFour Four {} } // There will be quite a few more in my actual code }
If under normal circumstances, most Components listed in the code above won’t be used during a normal user session, should I still place them here or should I only place them on the pages from which the Component page can be accessed?
- My second question is about clearing properties when leaving a page. If I load a page and a large amount of data is loaded into a property var when the page is loaded, should I clear that property when I leave the page so long as when the page is returned to, the property will have to be updated anyways. Or, is there some sort of automated way to set this up so memory can be cleared automatically?
Thank you,
Eric