bsl::allocator_traits::deallocate

Deallocate the storage at elementAddr for n objects.

Synopsis

Declared in <bslma_allocatortraits.h>

static
void
deallocate(
    ALLOCATOR_TYPE& basicAllocator,
    pointer elementAddr,
    size_type n);

Description

Invoke basicAllocator.deallocate(elementAddr, n). The behavior is undefined unless the specified elementAddr was returned from a prior call to the allocate method of an allocator that compares equal to the specified allocator, and has not yet been passed to a deallocate call of such an allocator object.

Parameters

NameDescription
basicAllocatorallocator that performs the deallocation
elementAddrpointer previously returned by allocate
nnumber of objects in the block to deallocate