Skip to content

Commit

Permalink
Recycling bitmaps when clearing cache
Browse files Browse the repository at this point in the history
  • Loading branch information
asos-savvasdalkitsis committed Nov 6, 2013
1 parent 357ba96 commit be3f3ec
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public void setImageRemovedListener(ImageRemovedListener listener) {
public void clearMemory() {
final Iterator<Map.Entry<String,Bitmap>> iterator = cache.entrySet().iterator();
while (iterator.hasNext()) {
iterator.next();
final Bitmap bitmap = iterator.next().getValue();
bitmap.recycle();
iterator.remove();
}
currentSize = 0;
Expand Down

0 comments on commit be3f3ec

Please sign in to comment.