On Jun 16, 2:29 am, MarcoAndroid <[email protected]> wrote:
> 1) 3-4M for one image is a lot since you have total of 16M for the
> whole app! Dunno the answer to your question

Yep

> 2) 25*256K in bitmaps is already over 6,4M. Added to 1) makes already
> over 10M! AFAIK you should only use .recycle() if you really don't
> need them anymore. Unclear to me what "really don't need" means.

That you can't use the bitmap object for drawing after you call
recycle. You'd have to recreate it.

> 3) 32x32 pixels is about 204800 bytes if you count 4 bytes per pixel
I was thinking 4096 bytes.

> 4) These icons are probably not big right?
>
No ,they are only 32x32 as well.

At one point, though, I have 50 or so icons in a gridview.

If I call:

         imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
         imageView.setImageResource(icon_id);

Does anyone know if the ImageView will create and preserve a bitmap of
the scaled up size? If so, that's bad, and I need to exert more
control.

> The allocation tracker didn't give enough details for me, so am using
> the Eclipse Memory Analyzer Tool. Here's a pretty handy tutorial on
> how to use it & detect memory leaks, maybe 
> useful:http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-andr...
>

I think that will help.

Nathan

-- 
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