[#BloombergLP-bslma-NewDeleteAllocator-allocator] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/NewDeleteAllocator.adoc[NewDeleteAllocator]::allocator :relfileprefix: ../../../ :mrdocs: Return `basicAllocator`, or this class's singleton if it is 0. == Synopsis Declared in `<bslma_newdeleteallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bslma/Allocator.adoc[Allocator]* allocator(xref:BloombergLP/bslma/Allocator.adoc[Allocator]* basicAllocator); ---- == Description Return the address of the specified modifiable `basicAllocator` or, if `basicAllocator` is 0, the process‐wide unique (see `singleton`) object of this class. Note that the behavior of this function is equivalent to the following expression: ` basicAllocator ? basicAllocator : &NewDeleteAllocator::singleton() ` Also note that if a `NewDeleteAllocator` object is supplied, it is owned by the class and must NOT be deleted. Finally note that this method should generally not be called directly by typical clients (see `bslma_default` for more information). == Return Value `basicAllocator`, or this class's singleton if it is 0 == Parameters [cols="1,4"] |=== | Name| Description | *basicAllocator* | allocator to return, or 0 for the singleton |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#