Groups
Groups
Sign in
Groups
Groups
Android Query
Conversations
About
Send feedback
Help
Do I need to Bitmap.recycle()?
207 views
Skip to first unread message
nagoya0
unread,
Aug 10, 2012, 3:25:00 AM
8/10/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to androi...@googlegroups.com
I display images on each row of Listview.
when I call aq.image(), or an activity finishes,
should I recycle old bitmaps?
Peter Liu
unread,
Aug 10, 2012, 4:31:19 AM
8/10/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to androi...@googlegroups.com, miso...@gmail.com
You mean the bitmap's recycle method?
Don't call that method because app will crash if the UI is displaying that image.
AQuery mem cache is a LRU with a max size of 4M, so it will flush out the least used ones automatically.
If you want to flush all images from memory call this:
http://android-query.googlecode.com/svn/trunk/javadoc/com/androidquery/callback/BitmapAjaxCallback.html#clearCache()
Reply all
Reply to author
Forward
0 new messages