Module java.base

Interface MemorySegment.Scope

Enclosing interface:
MemorySegment

public static sealed interface MemorySegment.Scope
A scope models the lifetime of all the memory segments associated with it. That is, a memory segment cannot be accessed if its associated scope is not alive. A new scope is typically obtained indirectly, by creating a new arena.

Scope instances can be compared for equality. That is, two scopes are considered equals(Object) if they denote the same lifetime.