[#bsl-allocator-0a-deallocate]
= xref:bsl.adoc[bsl]::xref:bsl/allocator-0a.adoc[allocator&lt;void&gt;]::deallocate
:relfileprefix: ../../
:mrdocs:

Deallocate the memory block at the specified `p` address&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
deallocate(
    xref:BloombergLP/bslma/BslAllocator_Voidish.adoc[BslAllocator&lowbar;Voidish]* p,
    std::size&lowbar;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&period; Optionally specify the number of objects, `n`, to deallocate&period; 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&lowbar;type` and not yet deallocated&period;

== 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]#
