public class

LruBitmapPool

extends Object
implements BitmapPool
java.lang.Object
   ↳ com.facebook.imagepipeline.memory.LruBitmapPool

Summary

Fields
protected final PoolBackend<Bitmap> mStrategy
Public Constructors
LruBitmapPool(int maxPoolSize, int maxBitmapSize, PoolStatsTracker poolStatsTracker)
Public Methods
synchronized Bitmap get(int size)
Gets a 'value' of size 'S' (or larger) from the pool, if available.
synchronized void release(Bitmap value)
void trim(MemoryTrimType trimType)
Trim memory.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.common.memory.MemoryTrimmable
From interface com.facebook.common.memory.Pool
From interface com.facebook.common.references.ResourceReleaser

Fields

protected final PoolBackend<Bitmap> mStrategy

Public Constructors

public LruBitmapPool (int maxPoolSize, int maxBitmapSize, PoolStatsTracker poolStatsTracker)

Public Methods

public synchronized Bitmap get (int size)

Gets a 'value' of size 'S' (or larger) from the pool, if available. Allocates a new value if necessary.

Parameters
size the logical size to allocate
Returns
  • a new value

public synchronized void release (Bitmap value)

public void trim (MemoryTrimType trimType)

Trim memory.