[#BloombergLP-bdls-MemoryUtil-deallocate]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/MemoryUtil.adoc[MemoryUtil]::deallocate
:relfileprefix: ../../../
:mrdocs:

Deallocate memory previously obtained from `allocate`&period;

== Synopsis

Declared in `&lt;bdls&lowbar;memoryutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
deallocate(void* address);
----

== Description

Deallocate a memory area at the specified `address` previously allocated with the `allocate` method&period; Return 0 on success, and a nonzero value otherwise&period; The behavior is undefined if read or write access to any memory in this area has been revoked and not restored&period; Note that deallocating memory does not change memory protection&period;

== Return Value

0 on success, and a nonzero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *address*
| address of memory previously returned by `allocate`
|===


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