[#BloombergLP-bslma-DefaultAllocatorGuard-2constructor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/DefaultAllocatorGuard.adoc[DefaultAllocatorGuard]::DefaultAllocatorGuard
:relfileprefix: ../../../
:mrdocs:

Create a scoped guard that installs the specified temporary allocator&period;

== Synopsis

Declared in `&lt;bslma&lowbar;defaultallocatorguard&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
DefaultAllocatorGuard(xref:BloombergLP/bslma/Allocator.adoc[Allocator]* temporary);
----

== Description

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *temporary*
| allocator to install as the default allocator
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
