[#BloombergLP-bslma-TestAllocator-restoreStatistics] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/TestAllocator.adoc[TestAllocator]::restoreStatistics :relfileprefix: ../../../ :mrdocs: Restore the statistics from the specified `savedStatistics` by appropriately combining the current values and the saved values. The behavior is undefined unless `savedStatistics` is a value returned by a previous call to `stashStatictics` on this same object, which has not been passed to `restoreStatistics` yet. This method restores the state of the statistics as if the corresponding `stashStatistics` call has never happened, in the following manner: == Synopsis Declared in `<bslma_testallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void restoreStatistics(xref:BloombergLP/bslma/TestAllocatorStashedStatistics.adoc[TestAllocatorStashedStatistics]* savedStatistics); ---- == Description Statistic | Restore value as ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ | ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ numAllocations | saved + current ‐ saved.numBlocksInUse numDeallocations | saved.numDeallocations + current.numDeallocations numMismatches | saved.numMismatches + current.numMismatches numBoundsErrors | saved.numBoundsErrors + current.numBoundsErrors numBlocksMax | max(saved.numBlocksMax, current.numBlocksMax) numBytesMax | max(saved.numBytesMax, current.numBytesMax) numBlocksTotal | saved + current ‐ saved.numBlocksInUse numBytesTotal | saved + current ‐ saved.numBytesInUse See also `stashStatistics`. [.small]#Created with https://www.mrdocs.com[MrDocs]#