13#ifndef ML_MEMORY_BLOCK_HANDLE_H
14#define ML_MEMORY_BLOCK_HANDLE_H
18#pragma warning( push,0 )
25#include "../mlMemoryManagerDllExport.h"
85#ifndef DOXYGEN_SHOULD_SKIP_THIS
The strong handle of a MLMemoryBlock.
MLMemoryBlockHandle()
Creates a memory block handle that is null.
MLMemoryBlockHandle(const MLWeakMemoryBlockHandle &weakMemoryBlockHandle)
Creates an memory block handle to the memory block of weakMemoryBlockHandle.
~MLMemoryBlockHandle()
If only weak handles to the memory block exist, then the memory block is added to the cache list.
size_t size() const
Returns the size of the data. If this handle is null, then 0 is returned.
bool isNull() const
Returns true if the handle does not reference a valid memory block.
void clear()
Releases the reference to the memory block.
MLMemoryBlockHandle(const MLMemoryBlockHandle &memoryBlockHandle)
Creates an additional memory block handle to the memory block of memoryBlockHandle.
void * data() const
Returns the data of the memory block. If this handle is null, then NULL is returned.
The weak handle of a MLMemoryBlock.
MLMemoryBlockHandle & operator=(const MLWeakMemoryBlockHandle &weakMemoryBlockHandle)
Creates a memory block handle from the weak memory block handle.
MLMemoryBlockHandle & operator=(const MLMemoryBlockHandle &memoryBlockHandle)
Creates a memory block handle from the memory block handle.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.