Monday, July 30, 2012

Re: [android-developers] Fragments Bitmap Recycling + a bunch of bitmap oriented questions.

"640K ought to be enough for anyone"

On Monday, July 30, 2012 1:30:46 AM UTC-5, Dianne Hackborn wrote:
On Sun, Jul 29, 2012 at 5:45 PM, bob <> wrote:
Worried about memory?  Try this:
<application android:largeHeap="true">


First of all, this only helps you on higher-end devices that have lots of memory to give you.  So you still need to look at the memory available and make sure you don't exceed it, and the limit may not be any more than you have now.  So this actually requires that you do *more* work on memory management.

In particular: "Most apps should not need this and should instead focus on reducing their overall memory usage for improved performance."

We'll further emphasize this: "This is the space available for memory-intensive applications; most applications should not need this amount of memory, and should instead stay with the getMemoryClass() limit."

This API does not "solve" your memory problems.  You are programming for a mobile, battery-powered, memory-constrained device.  Part of that is tight memory management.  You don't get to shove an attribute in your manifest and abdicate on that responsibility.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment