BloombergLP::bslstl::SharedPtrAllocateOutofplaceRep::makeOutofplaceRep

Create a new out-of-place shared-pointer representation.

Synopsis

Declared in <bslstl_sharedptrallocateoutofplacerep.h>

static
SharedPtrAllocateOutofplaceRep<TYPE, DELETER, ALLOCATOR>*
makeOutofplaceRep(
    TYPE* ptr,
    DELETER const& deleter,
    ALLOCATOR const& basicAllocator);

Description

Return the address of a newly created SharedPtrAllocateOutofplaceRep object that manages the lifetime of the specified ptr, uses the specified deleter to destroy ptr, and uses the specified basicAllocator to supply memory. Note that the parameterized DELETER type will be used to deallocate the memory pointed to by ptr.

Return Value

address of a newly created SharedPtrAllocateOutofplaceRep object

Parameters

NameDescription
ptraddress of the object whose lifetime is managed
deleterdeleter used to destroy ptr
basicAllocatorallocator used to supply memory for this representation