protected void deallocateBuffer ( int n ) { ByteBuffer bb = _buffers . set ( n , null ) ; if ( bb != null && _reuseBuffersCount > 0 ) { if ( _buffersToReuse == null ) { _buffersToReuse = new LinkedList < ByteBuffer > ( ) ; } if ( _reuseBuffersCount > _buffersToReuse . size ( ) ) { _buffersToReuse . add ( bb ) ; } } }
Removes a buffer from the list of internal buffers and saves it for reuse if this feature is enabled .