I use Glide to upload bitmaps to create gifs.
for (int i = 0, count = files.size(); i < count; i++) { Bitmap img = Glide.with(context) .load(files.get(i)) .asBitmap() .centerCrop() .into(GIF_EXPORT_SIZE / 2, GIF_EXPORT_SIZE / 2) .get();
I was wondering who is responsible for processing this bitmap or returning it to Glide BitmapPool? It seems that Glide cannot reuse it automatically or using clear() .
I looked at adding Bitmap back to the pool directly using something like Glide.get(context).getBitmapPool().put(img) , but according to the documentation using BitmapPool, it can directly lead to undefined behavior.
source share