private void OfferBufferToPool(ByteBuffer buf) { lock (_pool.SyncRoot) { if (_buffersInPool < _maxPoolEntries) { _pool[_buffersInPool] = buf; _buffersInPool += 1; } // else let the buffer be gc'd } } }