[#bsl-allocator-0a-deallocate] = xref:bsl.adoc[bsl]::xref:bsl/allocator-0a.adoc[allocator<void>]::deallocate :relfileprefix: ../../ :mrdocs: Deallocate the memory block at the specified `p` address. == Synopsis Declared in `<bslma_bslallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void deallocate( xref:BloombergLP/bslma/BslAllocator_Voidish.adoc[BslAllocator_Voidish]* p, std::size_t n = 1); ---- == Description Deallocate a block of memory at the specified `p` address by returning it to the memory resource held by this allocator. Optionally specify the number of objects, `n`, to deallocate. The behavior is undefined unless `p` is the address of a block previously allocated by a call to `allocate` with the same `n` from a copy of this allocator having the same `value_type` and not yet deallocated. == Parameters [cols="1,4"] |=== | Name| Description | *p* | address of memory previously returned by `allocate` | *n* | number of objects that were allocated (default 1) |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#