Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::core::CustomAllocation Class Reference

Allocation policy for objects (de)allocated using custom functions. More...

#include <allocation_policy.h>

Public Member Functions

 CustomAllocation ()
 Initialize in invalid state. Such instance wont be usable.
 
template<class T >
 CustomAllocation (void(*destroy_func)(T *))
 Initialize with given function. Such instance will use function to destroy objects.
 
template<class T >
void destroy (T &object)
 Destroy object and deallocate its memory.
 

Detailed Description

Allocation policy for objects (de)allocated using custom functions.

Definition at line 94 of file allocation_policy.h.

Constructor & Destructor Documentation

◆ CustomAllocation() [1/2]

roc::core::CustomAllocation::CustomAllocation ( )
inline

Initialize in invalid state. Such instance wont be usable.

Definition at line 100 of file allocation_policy.h.

◆ CustomAllocation() [2/2]

template<class T >
roc::core::CustomAllocation::CustomAllocation ( void(*)(T *)  destroy_func)
inline

Initialize with given function. Such instance will use function to destroy objects.

Definition at line 107 of file allocation_policy.h.

Member Function Documentation

◆ destroy()

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

Destroy object and deallocate its memory.

Definition at line 112 of file allocation_policy.h.


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