BloombergLP::bslma::DeallocateBytesProctor::reset

Release the managed memory and reset this proctor to manage a different block.

Synopsis

Declared in <bslma_deallocatebytesproctor.h>

void
reset(
    PtrType p,
    std::size_t nbytes,
    std::size_t alignment = k_MAX_ALIGNMENT);

Description

Release the managed memory and reset this proctor to manage the specified nbytes bytes at the specified p address. Optionally specify the alignment used to allocate p. If p is null, then the proctor is disengaged (manages no memory). The behavior is undefined unless p is null or was allocated with a size of nbytes and alignment of alignment from the same allocator used to construct this proctor. Note that the previously managed block is not deallocated.

Parameters

NameDescription
paddress of the memory block to manage, or null
nbytessize in bytes of the block at p
alignmentalignment used when p was allocated