BloombergLP::bslma::DefaultAllocatorGuard::DefaultAllocatorGuard

Create a scoped guard that installs the specified temporary allocator.

Synopsis

Declared in <bslma_defaultallocatorguard.h>

explicit
DefaultAllocatorGuard(Allocator* temporary);

Description

Create a scoped guard that installs the specified temporary allocator as the default allocator. Note that the default allocator is automatically restored to the original allocator on destruction.

Parameters

NameDescription
temporaryallocator to install as the default allocator