Are we not able to reassign Bitmaps? I get OOM just by doing something
like

Bitmap a;

a = network.downloadimage();
a = network.downloadimage();
a = network.downloadimage();// <-- crash

Do I have to :

a.recycle() ;
a= null;

everytime?


On Aug 25, 2:25 pm, freeanderson <[email protected]> wrote:
> I guess nobody reported my case.
> I've solved like below. See my case.
>
> .......
>
> Bitmap dummy = Bitmap.createBitma(1, 1, Config.RGB_565);
>
> Bitmap a = Bitmap.createBitma(100, 100, Config.RGB_565);
> Canvas c = new Canvas(a);
>
> ...c.draw(..) ...
>
> a.recycle();
> c.setBitmap(dummy); // This is key point. Very important to remove
> reference of 'c'.
>
> a = null;
> c = null;
>
> .........
>
> Good Luck.

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