Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::AllocatorWrapper< Allocator > Class Template Reference

#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.
 

Detailed Description

template<class Allocator>
class AZ::AllocatorWrapper< Allocator >

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.


The documentation for this class was generated from the following file: