RSC
0.12.1
|
A deleter for boost::shared_ptr which enables to use a pointer in a shared_ptr, which is not a shared_ptr itself and owned by another object. More...
#include <langutils.h>
Public Member Functions | |
ParentSharedPtrDeleter (boost::shared_ptr< ParentType > parent) | |
void | operator() (void const *) |
Private Attributes | |
boost::shared_ptr< ParentType > | parent |
A deleter for boost::shared_ptr which enables to use a pointer in a shared_ptr, which is not a shared_ptr itself and owned by another object.
The only requirement is that this object in turn is maintained by a shared_ptr. This deleter effectively keeps up the reference count of the parent object by storing an instance of a shared_ptr to the parent until the child ptr is deleted.
ParentType | type of the parent which is owned by a shared_ptr |
Definition at line 73 of file langutils.h.
|
inline |
Definition at line 75 of file langutils.h.
|
inline |
Definition at line 79 of file langutils.h.
References rsc::misc::ParentSharedPtrDeleter< ParentType >::parent.
|
private |
Definition at line 84 of file langutils.h.
Referenced by rsc::misc::ParentSharedPtrDeleter< ParentType >::operator()().