Create a new out‐of‐place shared‐pointer representation.
Synopsis
Declared in <bslma_sharedptroutofplacerep.h>
static
SharedPtrOutofplaceRep<TYPE, DELETER>*
makeOutofplaceRep(
TYPE* ptr,
DELETER const& deleter,
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
Name |
Description |
ptr |
address of the object whose lifetime is managed |
deleter |
deleter used to destroy |
basicAllocator |
memory allocator; null uses the default |
Created with MrDocs