[#BloombergLP-bslma-TestAllocatorStashedStatistics]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::TestAllocatorStashedStatistics
:relfileprefix: ../../
:mrdocs:

Saved `TestAllocator` statistics for later restoration&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class TestAllocatorStashedStatistics;
----

== Description

This simple unconstrained attribute type is used to store all information necessary to restore the state of all statistics of a `TestAllocator` after a `stashStatistics()` call that resets them&period; See also `TestAllocator&colon;&colon;stashStatistics` and `TestAllocator&colon;&colon;restoreStatistics`&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/2constructor.adoc[`TestAllocatorStashedStatistics`]         [.small]#[constructor]#
| Create a stash of the current statistics of `testAllocator`&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/markRestored.adoc[`markRestored`] 
| Mark this stash as restored so it cannot be restored again&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numAllocations.adoc[`numAllocations`] 
| Return the `numAllocations` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBlocksInUse.adoc[`numBlocksInUse`] 
| Return the `numBlocksInUse` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBlocksMax.adoc[`numBlocksMax`] 
| Return the `numBlocksMax` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBlocksTotal.adoc[`numBlocksTotal`] 
| Return the `numBlocksTotal` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBoundsErrors.adoc[`numBoundsErrors`] 
| Return the `numBoundsErrors` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBytesInUse.adoc[`numBytesInUse`] 
| Return the `numBytesInUse` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBytesMax.adoc[`numBytesMax`] 
| Return the `numBytesMax` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBytesTotal.adoc[`numBytesTotal`] 
| Return the `numBytesTotal` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numDeallocations.adoc[`numDeallocations`] 
| Return the `numDeallocations` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numMismatches.adoc[`numMismatches`] 
| Return the `numMismatches` attribute value&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/origin.adoc[`origin`] 
| Return a const pointer to the test allocator that was saved&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics/restore.adoc[`restore`] 
| Call `origin&hyphen;&gt;restoreStatistics(&ast;this)`&period;
|===



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