[#BloombergLP-bslma-AllocatorUtil-deallocateBytes] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/AllocatorUtil.adoc[AllocatorUtil]::deallocateBytes :relfileprefix: ../../../ :mrdocs: Deallocate a block of raw memory previously allocated by `allocateBytes`. == Synopsis Declared in `<bslma_allocatorutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ALLOCATOR> static void deallocateBytes( t_ALLOCATOR const& allocator, AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer p, std::size_t nbytes, std::size_t alignment = 0); ---- == Description Give back, to the specified `allocator`, the block of raw memory at the specified `p` address having the specified `nbytes` size and optionally specified `alignment`. If `alignment` is not specified, the natural alignment for an object of size `nbytes` is used. The behavior is undefined unless `p` refers to a block having the same size and alignment previously allocated from a copy of `allocator` and not yet deallocated. == Parameters [cols="1,4"] |=== | Name| Description | *allocator* | allocator to which to return the memory | *p* | address of the block to deallocate | *nbytes* | size in bytes of the block at `p` | *alignment* | alignment used when the block was allocated; 0 means natural alignment |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#