开发者

Loading screens one after the other is consuming a lot of memory [BlackBerry]

开发者 https://www.devze.com 2023-03-17 19:25 出处:网络
In my application I have a requirement to navigate from one screen to another without popping up the active screen so that if a user clicks the back button while navigating he should be able to view t

In my application I have a requirement to navigate from one screen to another without popping up the active screen so that if a user clicks the back button while navigating he should be able to view the previous screens where he came from. I implemented this by pushing screens one by one in the UI stack but while doing so I saw that there is a considerable consumption of the memory. Can anyone tell me how can I minimize the memory 开发者_Go百科used. In my app I saw that the memory is not released that much.


you can achieve it by this way .... it will work as you want.


ButtonField yourButton = new ButtonField("your Buton"){
         protected boolean navigationClick(int status, int time) {
               UiApplication.getUiApplication().
               popScreen(UiApplication.getUiApplication().getActiveScreen());
            return true;
            }
    };


The memory issue was not due to pushing so much screens to the display stack. I had some serious issues in my code due to which the resources were not releasing ending up in OutOfMemory exception.

I had corrected them and due to that my application is working well now. As far as I know now, there should not be any issues in pushing so many screens. It should work well.

0

精彩评论

暂无评论...
验证码 换一张
取 消