@Synchronized fun decrease(bitmap: Bitmap?) { val bitmapSize: Int = BitmapUtil.getSizeInBytes(bitmap) Preconditions.checkArgument(mCount > 0, "No bitmaps registered.") Preconditions.checkArgument( bitmapSize <= mSize, "Bitmap size bigger than the total registered size: %d, %d", bitmapSize, mSize ) mSize -= bitmapSize mCount-- }
Excludes given bitmap from the count .