Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Struct

Memory<T>

struct Memory<T>

Module: System
Assembly: System.Runtime.dll
Source file: Memory.rvn

Inheritance: Object → ValueType → Memory<T>

A persistent writable window retaining its managed backing owner. Copies share storage. Safe to store and carry across await; concurrent access is not synchronized.

Properties

2 items
IsEmpty: bool Whether this window has no elements.
Length: int Number of elements in this window.

Indexers

1 item
Item[range: Range]: Memory<T> Retains a half-open range without copying.

Methods

8 items
Equals(other: object?) -> bool Tests reference identity by default; an ordinary class may override equality. Inherited from Object.Equals
GetHashCode() -> int Returns a stable identity hash by default; an ordinary class may override it consistently with equality. Inherited from Object.GetHashCode
GetType() -> TypeInfo Returns metadata for the concrete runtime type of this instance. Inherited from Object.GetType
Slice(range: Range) -> Memory<T> Retains a half-open range relative to this window.
Slice(start: int, length: int) -> Memory<T> Retains a nested window. Invalid bounds fault; elements are not copied.
Slice(start: int) -> Memory<T> Retains a window from start to the end.
ToArray() -> T[] Copies the current window into a newly owned array.
ToString() -> string Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override. Inherited from Object.ToString

Operators

1 item
Static member: implicit conversion(source: T[]) -> Memory<T> Retains an array without copying its elements.