hey 
[email protected]<[email protected]>

We meet the same question,but we thought two ways to solve it:
1> cutting up a big bitmaps into many small bitmaps, less than 2M of every 
bitmaps, and then splitting joint small bitmaps 
2> using virtual-point idea to call small bitmaps when is used at once and 
release small bitmaps when isn't used at once.

Hope it useful for you.

Best Regards.

Jay Meng
EnjoyLifeHappyEveryday
CodeCore Groups

You received this message because you are subscribed to the Google
Groups "CodeCore" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.ca/group/codecoregroups?hl=en
2010-09-03 09:57:53 



发件人: [email protected] 
发送时间: 2010-09-03  07:41:48 
收件人: Android Developers 
抄送: 
主题: [android-developers] Re: Bitmaps and OutOfMemoryError: Best Practices 
needed 
 
We are also having occasional problems with OutOfMemory errors in
createBitmap. It tends to happen after a few orientation changes when
we are allocating the backbuffers. I have made it so that it calls
recycle() on the old bitmaps (if any exist) and does a System.gc()
before allocating the new backbuffers. Hopefully this will solve the
problem, but I'm worried that it could still happen.
What we are doing is allocating a backbuffer that is twice the width
and height of the screen so that we can quickly zoom in and out. With
a 854x480 screen this would presumably be 6.25MB in size.
The problem as I see it is the 16 or 24MB maximum heap size per
process. This is unreasonably small, especially on devices that have
512MB of RAM. Ideally the max heap size should be something like 64MB,
or perhaps allow apps to request a larger heap size from the user.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to