#include <AllocatorWrapper.h>
Public Member Functions | |
| AllocatorWrapper (const Allocator &)=delete | |
| template<typename... Args> | |
| void | Create (Args &&... args) |
| Creates the wrapped allocator. You may pass any custom arguments to the allocator's constructor. | |
| void | Destroy () |
| Destroys the wrapped allocator. | |
| Allocator * | Get () const |
| Provides access to the wrapped allocator. | |
| Allocator & | operator* () const |
| Provides access to the wrapped allocator. | |
| Allocator * | operator-> () const |
| Provides access to the wrapped allocator. | |
| operator bool () const | |
| Support for conversion to a boolean, returns true if the allocator has been created. | |
Safe wrapper for an instance of an allocator.
Generally it is preferred to use AllocatorInstance<> for allocator singletons over this wrapper, but you may want to use this wrapper in particular when scoping a custom allocator to the lifetime of some other object.