System::Buffers::MemoryHandle class

MemoryHandle class

Represents a handle to a block of memory.

class MemoryHandle : public System::IDisposable,
                     public System::Details::BoxableObjectBase

Methods

MethodDescription
virtual Dispose()Releases resources held by the memory handle.
get_Pointer() constGets the raw memory pointer associated with this handle.
MemoryHandle(void *)Initializes a new instance of the MemoryHandle type.

Remarks

This value type wraps a raw memory pointer and provides a disposable handle abstraction. It is used to represent ownership of a memory region in buffer-related APIs. Actual memory management (allocation and deallocation) is not performed by this type. All objects is unmovable in C++, so it simply holds a pointer to the memory block.

See Also