BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsltf::StdTestAllocatorConfigurationGuard Class Reference

#include <bsltf_stdtestallocator.h>

Public Member Functions

 StdTestAllocatorConfigurationGuard (bslma::Allocator *temporaryAllocator)
 
 ~StdTestAllocatorConfigurationGuard ()
 

Detailed Description

Upon construction, an object of this class saves the current delegate allocator for StdTestAllocator and and installs the user-specified allocator as the delegate allocator. The delegate allocator is the globally configured allocator to which an StdTestAllocator objects delegate their operations. On destruction, the original delegate allocator is restored.

See bsltf_stdtestallocator

Constructor & Destructor Documentation

◆ StdTestAllocatorConfigurationGuard()

bsltf::StdTestAllocatorConfigurationGuard::StdTestAllocatorConfigurationGuard ( bslma::Allocator temporaryAllocator)
inlineexplicit

Create a scoped guard that installs the specified temporaryAllocator as the delegate allocator.

◆ ~StdTestAllocatorConfigurationGuard()

bsltf::StdTestAllocatorConfigurationGuard::~StdTestAllocatorConfigurationGuard ( )
inline

Restore the delegate allocator that was in place when this scoped guard was created and destroy this guard.


The documentation for this class was generated from the following file: