Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect cache size reporting after Bitmap is recycled. #1726

Conversation

NightlyNexus
Copy link
Contributor

Previously, if a user called recycle on a Bitmap in the cache, the allocation size would not be subtracted correctly (on SDK 25+) when the Bitmap was evicted from the cache.

I'm not sure that anyone should ever call recycle on a Bitmap in the cache, but it'd be difficult to communicate the error.

Closes #1693

@JakeWharton
Copy link
Collaborator

Oof

@@ -17,6 +17,7 @@
package com.squareup.picasso;

import android.graphics.Bitmap;
import android.util.Pair;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused?

Previously, if a user called recycle on a Bitmap in the cache, the allocation size would not be subtracted correctly (on SDK 25+) when the Bitmap was evicted from the cache.
@NightlyNexus NightlyNexus force-pushed the eric.20170110.bitmap-recycled-in-cache branch from 0c219d0 to 4c80c43 Compare January 10, 2018 21:40
@JakeWharton JakeWharton merged commit afbcb3e into square:master Mar 3, 2018
@NightlyNexus NightlyNexus deleted the eric.20170110.bitmap-recycled-in-cache branch March 3, 2018 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants