zero_after_free_allocator

Allocator that clears the memory it manages before returning it to the system.

Synopsis

Declared in <support/allocators/zeroafterfree.h>

template<typename T>
struct zero_after_free_allocator;

Type Aliases

NameDescription
value_type The type of object this allocator allocates.

Member Functions

NameDescription
zero_after_free_allocator [constructor]Constructors
allocate Allocates uninitialized memory for n objects using std::allocator.
deallocate Clears and returns memory previously obtained from allocate.

Specializations

NameDescription
zero_after_free_allocator<byte> Allocator that clears the memory it manages before returning it to the system.

Friends

NameDescription
operator==Compares two allocators for equality; they are always equal since the allocator is stateless.

Non-Member Functions

NameDescription
operator==Compares two allocators for equality; they are always equal since the allocator is stateless.