[#BloombergLP-bslma-SharedPtrOutofplaceRep-makeOutofplaceRep] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/SharedPtrOutofplaceRep.adoc[SharedPtrOutofplaceRep]::makeOutofplaceRep :relfileprefix: ../../../ :mrdocs: Create a new out‐of‐place shared‐pointer representation. == Synopsis Declared in `<bslma_sharedptroutofplacerep.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bslma/SharedPtrOutofplaceRep.adoc[SharedPtrOutofplaceRep<TYPE, DELETER>]* makeOutofplaceRep( TYPE* ptr, DELETER const& deleter, xref:BloombergLP/bslma/Allocator.adoc[Allocator]* basicAllocator = 0); ---- == Description Return the address of a newly created `SharedPtrOutofplaceRep` object that manages the lifetime of the specified `ptr`, using the specified `deleter` to destroy `ptr`. Optionally, specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. Note that the parameterized `DELETER` type will be used to deallocate the memory pointed to by `ptr`. == Return Value address of a newly created `SharedPtrOutofplaceRep` object == Parameters [cols="1,4"] |=== | Name| Description | *ptr* | address of the object whose lifetime is managed | *deleter* | deleter used to destroy `ptr` | *basicAllocator* | memory allocator; null uses the default |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#