Java 类android.util.Pools.Pool 实例源码

项目:nexus-gallery    文件:SparseArrayBitmapPool.java   
/**
 * @param capacityBytes Maximum capacity of the pool in bytes.
 * @param nodePool Shared pool to use for recycling linked list nodes, or null.
 */
public SparseArrayBitmapPool(int capacityBytes, Pool<Node> nodePool) {
    mCapacityBytes = capacityBytes;
    if (nodePool == null) {
        mNodePool = new SimplePool<Node>(32);
    } else {
        mNodePool = nodePool;
    }
}