1.简单介绍
终于到达食物链顶端了,感觉很开心,PooledDirectByteBuf基于内存池的实现,与UnPooledDirectByteBufd的唯一不同是缓存区的分配和销毁策略的不同,其他功能是等同的。
2.创建实例
RECYCLE实际上是一个RECYCLeR的实例
private static final Recycler<PooledDirectByteBuf> RECYCLER = new Recycler<PooledDirectByteBuf>()
终于到达食物链顶端了,感觉很开心,PooledDirectByteBuf基于内存池的实现,与UnPooledDirectByteBufd的唯一不同是缓存区的分配和销毁策略的不同,其他功能是等同的。
RECYCLE实际上是一个RECYCLeR的实例
private static final Recycler<PooledDirectByteBuf> RECYCLER = new Recycler<PooledDirectByteBuf>()