public Pool(int capacity, Action <T> recycler) { if (recycler == null) { throw new ArgumentNullException("recycler"); } _id = PoolHelper.GetId(); _entries = new FixedSizeQueue <T>(capacity); _recycler = recycler; }
public Pool(int capacity) { _id = PoolHelper.GetId(); _entries = new FixedSizeQueue <T>(capacity); _recycler = GC.KeepAlive; }