xentara-utils v1.2.1
Xentara utilities library
|
Polymorphic placement for placement new. More...
#include <memory/Placement.hpp>
Public Member Functions | |
virtual | ~Placement ()=0 |
virtual destructor | |
virtual auto | allocate (std::size_t size) -> void *=0 |
Allocates memory for a new object. | |
virtual auto | deallocate (void *storage) noexcept -> void=0 |
Deallocates memory of an already destroyed object. | |
Polymorphic placement for placement new.
This class can be derived to allow construction of objects using placament new, where the memory needed for the object is allocated by a subclass of the placement.
|
pure virtualdefault |
virtual destructor
|
pure virtual |
Allocates memory for a new object.
size | The size of the block |
std::bad_alloc | Memory could not be allocated |
|
pure virtualnoexcept |
Deallocates memory of an already destroyed object.
storage | A pointer to the storage of the object |