An owning memory handle that derives from unique_ptr that deallocates memory using a Deallocator rather than std::default_delete when it goes out of scope.
More...
#include <bond/systems/allocator.h>
template<typename T>
class Bond::Allocator::Handle< T >
An owning memory handle that derives from unique_ptr that deallocates memory using a Deallocator rather than std::default_delete when it goes out of scope.
◆ Handle() [1/3]
Constructs a Handle object.
- Parameters
-
| allocator | The allocator that frees the memory, or null if it is not to be freed. |
| ptr | Pointer to the owned memory, which must have been allocated by allocator. |
◆ Handle() [2/3]
Constructs a Handle object.
- Parameters
-
| allocator | The allocator that frees the memory. |
| ptr | Pointer to the owned memory, which must have been allocated by allocator. |
◆ Handle() [3/3]
Constructs a Handle object that takes ownership of the memory owned by another.
◆ operator Handle< U >()
template<typename T>
template<typename U>
Transfers ownership of the memory to a Handle of another pointer type.
◆ operator=()
Frees the currently owned memory and takes ownership of the memory owned by another Handle.
The documentation for this class was generated from the following file:
- include/bond/systems/allocator.h