Interface for allocation and releasing of memory.
More...
|
| ~IObject ()=default |
| Protected destructor --> Use implemented Destroy() instead of delete!
|
|
Interface for allocation and releasing of memory.
Definition at line 23 of file memory_allocator_intf.h.
◆ ADTF_IID()
◆ Alloc()
virtual tResult Alloc |
( |
size_t |
nBytes, |
|
|
void *& |
pMemory, |
|
|
size_t & |
nCapacity |
|
) |
| |
|
pure virtual |
Allocates a contigeous block of memory which is at least of size nBytes.
- Parameters
-
[in] | nBytes | The amount of bytes that should be allocated. |
[out] | pMemory | This will point to the allocated memory. |
[out] | nCapacity | The actual size of the block. |
- Returns
- standard result.
◆ Free()
virtual tResult Free |
( |
void * |
pMemory | ) |
|
|
pure virtual |
Releases a block of memory that has been allocated with Alloc.
- Parameters
-
[in] | pMemory | The pointer to the memory. |
- Returns
- standard result