Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
Posts: 53
Registered: ‎04-05-2013
My Device: Q10
My Carrier: T-Mobile

App becomes *partially* unresponsive for 30 seconds after a pushed navigation page is destroyed.

[ Edited ]

There is a really long pause after page.destroy(), when I press "back" and

destroy a pushed Navigation Page.

This page was used to load and show a ridiculously huge list.
The page, when it is destroyed, contains a lot of child QObjects in its model, objects that need to be destroyed. I suppose it is understandable that it takes some time to clean up...

During this time, my program is *partially* nonresponsive but it
does queue tap events in the ListView, responds to the swipe-to-scroll
up/down gestures, shows/hides the menus, and also let me change tabs.

However, I believe one of the main threads is blocked still.

This is because if I keep tapping on the listview (which responds to scrolls but not taps!!)

each tap event is queued, but no new page is created/pushed until delay has passed, so it APPEARS as if my tap didn't register at all.

 

Then, the device wakes up... and all of those tap events are consumed and lots of duplicate pages are created and pushed!

 

I want to avoid that.


After about 30 seconds (!), everything goes back to normal.

 

Is this garbage collection? Which thread handles this?

I normally expect duplicate tap events on my listview to be ignored after the first one is clicked, but I guess need to pop up something modal while this is happening.

 

What I want to know is, how do I know when this starts and ends? Is there a signal I can listen to?

It seems that page.destroy does its cleanup in a different thread? How do I know when that thread is no longer busy?