On Thu, Oct 14, 2010 at 1:10 PM, Lisa <[email protected]> wrote:
> please help me. 。゜゜(´□`。)°゜。
>
> I am using android 1.6.
>
> my code to release a bitmap looks like this:
>
> if (imageBG != null) {
> imageBG.recycle();
>    imageBG = null;
>
> }
>
> but when I do get to the following error: (u_u,)
>
> 10-14 11:36:52.069: ERROR/AndroidRuntime(618): Uncaught handler:
>
> [...]
>
> What should I do? ~(・・?)
> I do not know how to release memory. 。゜゜(´□`。)°゜。
>
> please, help me.┌(_ _)┐
>
> Thanks a lot for all your replies. m(_ _)m
>

Lisa,

Few things to look at:
- how big are your images within layout? I mean, whether you need them
to be 854x480? Do you display each one in "full screen" mode? If not,
subsample bitmap by using BitmapFactory.Options preferably to the size
you are going to use on the screen.
- did you try running it with some debug view on Heap size (free
memory)? Your exception suggests that the the image has been recycled
before painting, which naturally would cause it to crash.

Daniel

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