This proctor is used for out‐of‐place shared pointer instantiations. Generally, a proctor is created prior to constructing a SharedPtrOutofplaceRep and released after successful construction. In the event that an exception is thrown during construction of the representation, the proctor will delete the provided pointer using the provided deleter. Note that the provided deleter is held by reference and must remain valid for the lifetime of the proctor. If the proctor is not released before it's destruction, a copy of the deleter is instantiated to delete the pointer (in case operator() is non‐`const`). Also note that if the deleter throws during copy construction, the provided pointer will not be destroyed.

Synopsis

Declared in <bslma_sharedptroutofplacerep.h>

template<
    class TYPE,
    class DELETER>
struct SharedPtrOutofplaceRep_InitProctor;

Member Functions

Name

Description

SharedPtrOutofplaceRep_InitProctor [constructor]

Create a proctor referring to the specified ptr and using the specified deleter to destroy ptr when the proctor is destroyed.

~SharedPtrOutofplaceRep_InitProctor [destructor]

Destroy this proctor and the object (if any) referred to by this proctor.

release

Release from management the object referred to by this proctor.

Data Members

Name

Description

d_deleter

deleter used to destroy managed object

d_ptr_p

address of the managed object (held, not

Created with MrDocs