Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::IAllocator Class Referenceabstract

Memory allocator interface. More...

#include <iallocator.h>

Inheritance diagram for roc::core::IAllocator:

Public Member Functions

virtual void * allocate (size_t size)=0
 Allocate memory. More...
 
virtual void deallocate (void *)=0
 Deallocate previously allocated memory. More...
 
template<class T >
void destroy (T &object)
 Destroy object and deallocate its memory. More...
 

Detailed Description

Memory allocator interface.

Definition at line 23 of file iallocator.h.

Member Function Documentation

virtual void* roc::core::IAllocator::allocate ( size_t  size)
pure virtual

Allocate memory.

Returns
pointer to a maximum aligned uninitialized memory at least of size bytes or NULL if memory can't be allocated.

Implemented in roc::core::HeapAllocator.

virtual void roc::core::IAllocator::deallocate ( void *  )
pure virtual

Deallocate previously allocated memory.

Implemented in roc::core::HeapAllocator.

template<class T >
void roc::core::IAllocator::destroy ( T &  object)
inline

Destroy object and deallocate its memory.

Definition at line 37 of file iallocator.h.


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