InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BypassPurgingAllocator< T > Class Template Reference

#include <BypassAllocator.h>

Classes

struct  rebind
 

Public Types

typedef T value_type
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef T & reference
 
typedef const T & const_reference
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 

Public Member Functions

pointer address (reference value) const
 
const_pointer address (const_reference value) const
 
 BypassPurgingAllocator (const BypassPurgingAllocator &src) noexcept
 
template<class U >
 BypassPurgingAllocator (const BypassPurgingAllocator< U > &src) noexcept
 
size_type max_size () const noexcept
 
pointer allocate (size_type num, const void *=0)
 
void construct (pointer p, const T &value)
 
void destroy (pointer p)
 
void deallocate (pointer p, size_type num)
 

Detailed Description

template<class T>
class BypassPurgingAllocator< T >

Alocator that bypasses the purging mechanism in our default allocator. Used in special places that cause problems if a purge happens in the middle of a allocation. Still uses the allocation tracker for memory leak detection. IMPORTANT: if the system allocator fails to allocate the requested block this allocator doesn't attempt to purge so it will throw std::bad_alloc.