-
- All Implemented Interfaces:
-
com.facebook.common.memory.MemoryTrimmable,com.facebook.common.memory.Pool,com.facebook.common.memory.Pool,com.facebook.common.references.ResourceReleaser,com.facebook.imagepipeline.memory.BitmapPool
@ThreadSafe() public class BucketsBitmapPool extends BasePool<Bitmap> implements BitmapPool
Manages a pool of bitmaps. This allows us to reuse bitmaps instead of constantly allocating them (and pressuring the Java GC to garbage collect unused bitmaps).
The pool supports a get/release paradigm. get() allows for a bitmap in the pool to be reused if it matches the desired dimensions; if no such bitmap is found in the pool, a new one is allocated. release() returns a bitmap to the pool.
-
-
Constructor Summary
Constructors Constructor Description BucketsBitmapPool(MemoryTrimmableRegistry memoryTrimmableRegistry, PoolParams poolParams, PoolStatsTracker poolStatsTracker, boolean ignoreHardCap)Creates an instance of a bitmap pool.
-
Method Summary
Modifier and Type Method Description -
Methods inherited from class com.facebook.imagepipeline.memory.BasePool
get, getStats, release, trim -
Methods inherited from class com.facebook.common.memory.Pool
get, release -
Methods inherited from class com.facebook.common.memory.MemoryTrimmable
trim -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BucketsBitmapPool
BucketsBitmapPool(MemoryTrimmableRegistry memoryTrimmableRegistry, PoolParams poolParams, PoolStatsTracker poolStatsTracker, boolean ignoreHardCap)
Creates an instance of a bitmap pool.- Parameters:
memoryTrimmableRegistry- the memory manager to register withpoolParams- pool parameters
-
-
-
-