Class RentedMemoryStream
Represents non-resizable memory stream which is backed by rented array of bytes.
Inherited Members
Namespace: DotNext.IO
Assembly: DotNext.IO.dll
Syntax
public sealed class RentedMemoryStream : MemoryStream, IAsyncDisposable, IDisposable, IGrowableBuffer<byte>
Constructors
| Improve this Doc View SourceRentedMemoryStream(Int32)
Initializes a new non-resizable memory stream of rented memory from shared array pool.
Declaration
public RentedMemoryStream(int capacity)
Parameters
Type | Name | Description |
---|---|---|
Int32 | capacity | The recommended capacity of the memory stream. |
RentedMemoryStream(Int32, ArrayPool<Byte>)
Initializes a new non-resizable memory stream of rented memory from shared array pool.
Declaration
public RentedMemoryStream(int capacity, ArrayPool<byte> pool)
Parameters
Type | Name | Description |
---|---|---|
Int32 | capacity | The recommended capacity of the memory stream. |
ArrayPool<Byte> | pool | The array pool used to rent the underlying buffer. |
Methods
| Improve this Doc View SourceDispose(Boolean)
Releases all resources used by this stream.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |