docs: public CloseableReference<Bitmap> pinBitmap(Bitmap bitmap) {
      Preconditions.checkNotNull(bitmap);
      try {
        // Real decoding happens here - if the image was corrupted, this will throw an exception
        nativePinBitmap(bitmap);
      } catch (Exception e) {
        bitmap.recycle();
        throw Throwables.propagate(e);
      }
      if (!mUnpooledBitmapsCounter.increase(bitmap)) {
        int bitmapSize = BitmapUtil.getSizeInBytes(bitmap);
        bitmap.recycle();
        String detailMessage = String.format(
            Locale.US,
            "Attempted to pin a bitmap of size %d bytes."
                + " The current pool count is %d, the current pool size is %d bytes."
                + " The current pool max count is %d, the current pool max size is %d bytes.",
            bitmapSize,
            mUnpooledBitmapsCounter.getCount(),
            mUnpooledBitmapsCounter.getSize(),
            mUnpooledBitmapsCounter.getMaxCount(),
            mUnpooledBitmapsCounter.getMaxSize());
        throw new TooManyBitmapsException(detailMessage);
      }
      return CloseableReference.of(bitmap, mUnpooledBitmapsCounter.getReleaser());
    }