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

Java Development

Reply
Super Contributor
Posts: 257
Registered: ‎05-05-2011
My Device: 9700
My Carrier: AT&T

Maximum bitmaps on one screen?

Hi guys,

 I wonder if there is some memory limit on maximum number of Bitmap objects initiated on the screen?  I mean I have like *garage screen* in my game and 60 cars + other images and it seems loading time causes errors. Is this possible? 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Maximum bitmaps on one screen?

[ Edited ]

Performance and attributes of the device, like memory, will provide the limits - there is no magic number.

 

There can be issues with Bitmaps and memory depending on how the bitmaps are loaded.  Remember that loading and scaling Bitmaps is an expensive operation. in terms of memory used and processing capacity. If you are hitting a memory limit, then you will proably see the hour glass icon indicating the garbage collector has kicked in.  Do you see tkis?

Super Contributor
Posts: 257
Registered: ‎05-05-2011
My Device: 9700
My Carrier: AT&T

Re: Maximum bitmaps on one screen?

I need to provide more details:   I load about 60+ images which have 2 mb size in total.  Strange thing is that on emulator everything works great but on my 9700 - it just shows black screen and freezes the phone. No hour glass icon. 

Highlighted
Developer
Posts: 246
Registered: ‎12-13-2010
My Device: Not Specified

Re: Maximum bitmaps on one screen?

The emulator will work faster than the device. Make sure your not processing on the ui thread and and are correctly creating whatever fields you need on the ui thread or synchronizing with it.