Deallocate the memory block at the specified p address.

Synopsis

Declared in <bslma_bslallocator.h>

void
deallocate(
    BslAllocator_Voidish* p,
    std::size_t n = 1);

Description

Deallocate a block of memory at the specified p address by returning it to the memory resource held by this allocator. Optionally specify the number of objects, n, to deallocate. The behavior is undefined unless p is the address of a block previously allocated by a call to allocate with the same n from a copy of this allocator having the same value_type and not yet deallocated.

Parameters

Name

Description

p

address of memory previously returned by allocate

n

number of objects that were allocated (default 1)

Created with MrDocs