3#include "system/object_ext.h"
4#include "system/idisposable.h"
5#include "system/buffers/memory_handle.h"
9template<
typename>
class Memory;
10template<
typename>
class Span;
22 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
23 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
Represents a handle to a block of memory.
Definition: memory_handle.h:14
Provides an abstraction for managing memory blocks.
Definition: memory_manager.h:18
Memory< T > CreateMemory(int start, int length)
Creates a Memory<T> instance representing a sub-range of this MemoryManager.
Definition: memory_manager.h:59
virtual MemoryHandle Pin(int32_t elementIndex=0)=0
Returns a handle to the memory that has been pinned so its address can be taken.
virtual void Unpin()=0
Indicates the memory can be moved again; unpins previously pinned memory.
void Dispose() override
Disposes the memory manager and releases any resources it holds.
Definition: memory_manager.h:43
Memory< T > CreateMemory(int length) const
Creates a Memory<T> instance representing this MemoryManager starting at offset 0.
Definition: memory_manager.h:51
virtual Span< T > GetSpan()=0
Returns a span wrapping the underlying memory.
virtual void Dispose(bool disposing)=0
Releases resources held by the manager.
virtual Memory< T > get_Memory()
Returns a Memory<T>.
Definition: memory_manager.h:27
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
Represents a mutable memory segment backed by an array.
Definition: memory.h:154
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Represents a contiguous region of arbitrary memory similar to C++20's std::span.
Definition: span.h:364
Definition: db_command.h:9
SmartPtr< X > MakeSharedPtr(X *p)
Converts raw pointer to smart pointer.
Definition: smart_ptr.h:1650