System::Memory class

Memory class

Represents a mutable memory segment backed by an array.

template<typename T>class Memory : public System::Details::MemoryCore<T>

Methods

MethodDescription
CopyTo(const Memory&)Copies the contents of this memory to the destination memory.
static get_Empty()Gets an empty Memory instance.
get_Span() constGets a span that represents the current memory.
operator ReadOnlyMemory< T >() constImplicitly converts Memory to ReadOnlyMemory.
Slice(int32_t, int32_t) constCreates a slice of the current memory.
static to_Memory(const ArrayPtr<T>&)Creates a Memory instance from the specified array.
ToString() constConverts the character memory to a string representation.
ToString() constConverts the ordinary memory to a string representation.
TryCopyTo(const Memory&)Attempts to copy the contents of this memory to the destination memory.

Remarks

Exposes a span over the array region and supports slicing and copying.

See Also