Interface IUnmanagedMemoryOwner<T>
Represents unmanaged memory access that allows to obtain Memory<T> pointing to the unmanaged memory.
Inherited Members
Namespace: DotNext.Buffers
Assembly: DotNext.Unsafe.dll
Syntax
public interface IUnmanagedMemoryOwner<T> : IUnmanagedMemory<T>, IMemoryOwner<T>, IConvertible<Memory<T>>, IUnmanagedArray<T>, IUnmanagedMemory, IDisposable, IConvertible<Stream>, IEnumerable<T>, IEnumerable, ICloneable, IConvertible<T[]> where T : struct
Type Parameters
| Name | Description |
|---|---|
| T | The type of elements to store in memory. |
Methods
| Improve this Doc View SourceReallocate(Int32)
Resizes a block of memory represented by this instance.
Declaration
void Reallocate(int length)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | length | The new number of elements in the unmanaged array. |
Remarks
This method is dangerous becase it invalidates all buffers returned by Memory property.
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | The underlying unmanaged memory is released. |
| ArgumentOutOfRangeException |
|