Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Buffers.​MemoryManager`1

Assembly: System.Runtime

Inheritance: object → MemoryManager`1

An abstract base class that is used to replace the implementation of <see cref="T:System.Memory`1" /> .

Properties

public Memory`1
Memory
Gets the memory block handled by this <see cref="T:System.Buffers.MemoryManager`1" /> .

Methods

protected Memory`1
CreateMemory​(int length)
length The number of elements in the memory buffer, starting at offset 0.
Returns A memory buffer.
Returns a memory buffer consisting of a specified number of elements from the memory managed by the current memory manager.
protected Memory`1
CreateMemory​(int start, int length)
start The offset to the element at which the returned memory buffer starts.
length The number of elements to include in the returned memory buffer.
Returns A memory buffer that consists of <paramref name="length" /> elements starting at offset <paramref name="start" /> .
Returns a memory buffer consisting of a specified number of elements starting at a specified offset from the memory managed by the current memory manager.
protected void
Dispose​(bool disposing)
disposing <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.
Releases all resources used by the current memory manager.
public Span`1
GetSpan​()
Returns A memory span that wraps the underlying memory buffer.
Returns a memory span that wraps the underlying memory buffer.
public MemoryHandle
Pin​(int elementIndex = 0)
elementIndex The offset to the element in the memory buffer at which the returned <see cref="T:System.Buffers.MemoryHandle" /> points.
Returns A handle to the memory that has been pinned.
Returns a handle to the memory that has been pinned and whose address can be taken.
public void
Unpin​()
Unpins pinned memory so that the garbage collector is free to move it.
public bool
Equals​(object obj)
Inherited from object
obj The object to compare with the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
Determines whether the specified object is equal to the current object.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public int
GetHashCode​()
Inherited from object
Returns A hash code for the current object.
Serves as the default hash function.
public Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .
public string
ToString​()
Inherited from object
Returns A string that represents the current object.
Returns a string that represents the current object.