BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslma::SharedPtrOutofplaceRep_InitProctor< TYPE, DELETER > Struct Template Reference

#include <bslma_sharedptroutofplacerep.h>

Public Member Functions

 SharedPtrOutofplaceRep_InitProctor (TYPE *ptr, const DELETER &deleter)
 
 ~SharedPtrOutofplaceRep_InitProctor ()
 
void release ()
 Release from management the object referred to by this proctor.
 

Public Attributes

TYPE * d_ptr_p
 
const DELETER & d_deleter
 

Detailed Description

template<class TYPE, class DELETER>
struct bslma::SharedPtrOutofplaceRep_InitProctor< TYPE, DELETER >

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.

Constructor & Destructor Documentation

◆ SharedPtrOutofplaceRep_InitProctor()

template<class TYPE , class DELETER >
bslma::SharedPtrOutofplaceRep_InitProctor< TYPE, DELETER >::SharedPtrOutofplaceRep_InitProctor ( TYPE *  ptr,
const DELETER &  deleter 
)
inline

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

◆ ~SharedPtrOutofplaceRep_InitProctor()

template<class TYPE , class DELETER >
bslma::SharedPtrOutofplaceRep_InitProctor< TYPE, DELETER >::~SharedPtrOutofplaceRep_InitProctor ( )
inline

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

Member Function Documentation

◆ release()

template<class TYPE , class DELETER >
void bslma::SharedPtrOutofplaceRep_InitProctor< TYPE, DELETER >::release ( )
inline

Member Data Documentation

◆ d_deleter

template<class TYPE , class DELETER >
const DELETER& bslma::SharedPtrOutofplaceRep_InitProctor< TYPE, DELETER >::d_deleter

◆ d_ptr_p

template<class TYPE , class DELETER >
TYPE* bslma::SharedPtrOutofplaceRep_InitProctor< TYPE, DELETER >::d_ptr_p

The documentation for this struct was generated from the following file: