[#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&hyphen;of&hyphen;place shared&hyphen;pointer representation&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bslma/SharedPtrOutofplaceRep.adoc[SharedPtrOutofplaceRep&lt;TYPE, DELETER&gt;]*
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`&period; Optionally, specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; Note that the parameterized `DELETER` type will be used to deallocate the memory pointed to by `ptr`&period;

== 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&semi; null uses the default
|===


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