Interface IDisposablePooledBuffer
Represents a pooled buffer that must be disposed to return to the pool.
public interface IDisposablePooledBuffer : IPooledBuffer, IDisposable
- Inherited Members
- Extension Methods
Examples
using var buffer = bufferService.RentBuffer(1024);
// Use buffer.Buffer, buffer.Memory, or buffer.Span
// Buffer is automatically returned to pool when disposed
Remarks
This interface extends IPooledBuffer with IDisposable for buffers that are rented from a pool and must be returned when no longer needed.
Disposing the buffer returns it to the originating pool. After disposal, accessing the buffer properties will throw ObjectDisposedException.