API Documentation
Public Member Functions | List of all members
nkMemory::DefaultAllocator< T > Class Template Referencefinal

A utility default allocator allocating an object through a simple call to new. More...

Inheritance diagram for nkMemory::DefaultAllocator< T >:
nkMemory::Allocator< T >

Public Member Functions

 DefaultAllocator () noexcept=default
 
virtual ~DefaultAllocator ()=default
 
virtual T * allocate () override
 
- Public Member Functions inherited from nkMemory::Allocator< T >
 Allocator () noexcept=default
 
virtual ~Allocator ()=default
 

Detailed Description

template<typename T>
class nkMemory::DefaultAllocator< T >

A utility default allocator allocating an object through a simple call to new.

Constructor & Destructor Documentation

◆ DefaultAllocator()

template<typename T >
nkMemory::DefaultAllocator< T >::DefaultAllocator ( )
defaultnoexcept

Constructor.

◆ ~DefaultAllocator()

template<typename T >
virtual nkMemory::DefaultAllocator< T >::~DefaultAllocator ( )
virtualdefault

Destructor.

Member Function Documentation

◆ allocate()

template<typename T >
virtual T* nkMemory::DefaultAllocator< T >::allocate ( )
overridevirtual

Allocates using the new operator. If a more complex behaviour is needed, external code needs to implement their own Allocator.

Returns
A newly allocated object.

Implements nkMemory::Allocator< T >.


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