[#BloombergLP-bslma-TestAllocator-deallocate-01] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/TestAllocator.adoc[TestAllocator]::deallocate :relfileprefix: ../../../ :mrdocs: Return the memory block at `address` back to this allocator. == Synopsis Declared in `<bslma_testallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual void deallocate(void* address) override; ---- == Description Return the memory block at the specified `address` back to this allocator. If `address` is 0, this function has no effect (other than to record relevant statistics). Otherwise, if the memory at `address` is consistent with being allocated from this test allocator, decrement the number of currently allocated blocks, and decrease the number of currently allocated bytes by the size (in bytes) originally requested for the block. Although technically undefined behavior, if the memory can be determined not to have been allocated from this test allocator, increment the number of mismatches, and ‐‐ unless in quiet mode ‐‐ immediately report the details of the mismatch to `stdout` (e.g., as an `std::hex` memory dump) and abort. == Parameters [cols="1,4"] |=== | Name| Description | *address* | Memory block previously allocated by this allocator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#