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

Synopsis

Declared in <support/allocators/zeroafterfree.h>

template<>
struct zero_after_free_allocator<byte>;

Type Aliases

Name

Description

value_type

The type of object this allocator allocates.

Member Functions

Name

Description

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.

Friends

Name

Description

operator==

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

Created with MrDocs