How does memory management work in a QML application? What tools can I use to find a leak? Can I dump objects manually? If I am using mobility location and continually adding MapCircles while the user is moving, can I know how much memory is needed to add each MapCircle?
As far as I understood you have no such a luxury to profile QML. By the way where you intend to search for the leaks if you are not working with a memory directly?
[quote]If I am using mobility location and continually adding MapCircles while the user is moving, can I know how much memory is needed to add each MapCircle?[/quote]
It is a declarative language with a solid abstraction layer if you so concerned about memory you should use C++ instead. I doubt there is a way to tell you that specific information.
From my point of view it is a wrong way to bother about memory and use language such as QML at the same time.
I agree that if memory management is a big concern you should concentrate on c++/Qt but don't see why is not a good thing to, at least, have how to figure out the memory footprint/requirements and know how qml manages memory of a qml application. After all, it may be the information you need to decide to use c++ instead.
We have some black boxes when using not direct languages such as .NET, Java, XSLT, QML etc. It allows developers of a language to change the under-layer of a platform without affecting an end user. And allows end users to have no pain with a memory management.
Imagine if Trolls public some information which their testers are gathered through tests. Or developers rigorously calculated all underlayed data which is used by QML (who will pay for it?)
And... We have new release! And in that release we have huge changes throughout all the QML underlayed platform. What the developers would do? I think they would shot themselves up just not to calculate all those staff again.
If you have doubts about memory consuming of your future GUI just write a small prototype which would give you an answer how much memory you will need(approximately)
[quote author="kyleplattner" date="1294160066"]How does memory management work in a QML application? What tools can I use to find a leak? Can I dump objects manually? If I am using mobility location and continually adding MapCircles while the user is moving, can I know how much memory is needed to add each MapCircle?[/quote]
if you are really interested in that, you can try debugging qmlviewer/your wrapper with your QML inside. application builds object hierarchy based on your QML file and the most probable reason of any memory leak can be seen
Memory management is a low level programming topic. QML as a scripting language is focused on ease of creating Mobile based applications. Certainly there have been full attention on its memory management and processing model.
I think some memory management tool would be good. There isn't any?
But you just have to rely on the fact that the Trolls have done everything they can to make the memory management work well in the C++ back-ends.
I think Kyle's area is more to do with: is it better to use a Repeater here, a Group here or dynamically create objects here -- for example.