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 <bob@coolfone.comze.com> wrote:
Worried about memory?  Try this:
<application android:largeHeap="true">

No.

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
hackbod@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment