09-29-2012 05:11 PM
I recently returned from the BB Jam event in San Jose and am starting to delve deeper into BB10 development. When I run a sample 'NavigationPane' application on my device I notice that memory use increases as i push and pop a screen multiple times. The sample is coded in QML (No custom C++ components). While the increase is small it can add up over time.
Has anyone else noticed this behavior? I don't like shipping apps with memory leaks.
Here's a link to the code sample
Here's what the Memory Summary page shows:

09-30-2012 02:59 AM
If I remember correctly, it is your job to delete the page when it is popped from the navigationpane. So with this you are just creating more and more objects right? Or is it just pushing and popping the exact same object?
09-30-2012 07:33 PM
Hi Kyle,
In this case I've set the NavigationPane to destroy pages on 'pop' per some of the samples that I've seen. Here's the relevant code snippet:
import bb.cascades 1.0
NavigationPane {
id: nav
attachedObjects: ComponentDefinition {
id: highScoreScreen
source: "HighScoreScreen.qml"
}
// Transition is done destory the Page to free up memory.
onPopTransitionEnded: {
page.destroy();
}
}
Is there anything else that needs to be setup?
10-01-2012 02:10 AM
That should be all you have to do
10-01-2012 09:27 AM
Thanks for taking a look. I've created an issue on the Issue tracker for this (In case anyone else is curious):