Use it on bitmaps that are no longer needed.

It's your application, you should know when that is.

-- Kostya

2011/4/7 vani reddy <vani.redd...@gmail.com>

> Hi,
> Please find attached my code, getBitmap() is converting to bitmap .
> Tell me where shud i use the recycle method?
>
>
> 2011/4/7 Kostya Vasilyev <kmans...@gmail.com>
>
>>  ? ? ?
>>
>> It's your code, so you should know which images are no longer needed.
>>
>> 07.04.2011 15:16, vani reddy пишет:
>>
>> Hi,
>> Actually for our project we have set a timer to refresh the offers every
>> 60sec and redraw the view, how to know that the bitmaps are not required
>> anymore?
>> This is what i want.
>>
>>
>> On Thu, Apr 7, 2011 at 4:15 PM, Kostya Vasilyev <kmans...@gmail.com>wrote:
>>
>>> It's just as it says - trying to draw the bitmap after it's been
>>> recycle()'d.
>>>
>>> Recycle only those bitmaps that aren't needed anymore.
>>>
>>> -- Kostya
>>>
>>> 07.04.2011 14:33, vani reddy пишет:
>>>
>>>  Hi,
>>>> when i try to recycle the bitmap its throwing the below error
>>>>
>>>> 04-07 16:15:55.861: ERROR/AndroidRuntime(6255):
>>>> java.lang.RuntimeException: Canvas: trying to use a recycled bitmap
>>>> android.graphics.Bitmap@45044b80
>>>> 04-07 16:15:55.861: ERROR/AndroidRuntime(6255): at
>>>> android.graphics.Canvas.throwIfRecycled(Canvas.java:955)
>>>> 04-07 16:15:55.861: ERROR/AndroidRuntime(6255): at
>>>> android.graphics.Canvas.drawBitmap(Canvas.java:1044)
>>>> 04-07 16:15:55.861: ERROR/AndroidRuntime(6255): at
>>>> android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:323)
>>>>
>>>
>>>
>>>  --
>>> Kostya Vasilyev -- http://kmansoft.wordpress.com
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>>
>> --
>>  Regards,
>> Vani Reddy
>>
>>   --
>> 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+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>> --
>> Kostya Vasilyev -- http://kmansoft.wordpress.com
>>
>>  --
>> 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+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
>  Regards,
> Vani Reddy
>
>  --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Reply via email to