|
libtgd 5.0
A library that makes working with multidimensional arrays in C++ easy
|
The default allocator based on new[] and delete[]. More...
#include <alloc.hpp>
Inherited by TGD::MmapAllocator.
Public Member Functions | |
| Allocator () | |
| Constructor. | |
| virtual | ~Allocator () |
| Destructor. | |
| virtual unsigned char * | allocate (std::size_t n) const |
| Allocates n bytes via new[]. | |
| virtual std::function< void(unsigned char *p)> | getDeallocator (std::size_t) const |
| Returns a function that deallocates memory via delete[]. | |
| virtual bool | clearsMemory () const |
| Returns whether this allocator clears allocated memory. | |
The default allocator based on new[] and delete[].
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Allocates n bytes via new[].
Reimplemented in TGD::MmapAllocator.
|
inlinevirtual |
Returns whether this allocator clears allocated memory.
Reimplemented in TGD::MmapAllocator.
|
inlinevirtual |
Returns a function that deallocates memory via delete[].
Reimplemented in TGD::MmapAllocator.