RefLinked< T > Class Template Reference

#include <Pt/SmartPtr.h>

Reference linking policy for SmartPtr. More...

Protected Member Functions

 RefLinked ()
 Default constructor.
 
void link (const RefLinked &ptr, T *object)
 Link a smart pointer to a managed object.
 
bool unlink (T *object)
 Unlink a smart pointer from a managed object.
 

Detailed Description

template<typename T>
class Pt::RefLinked< T >

Reference linking means that no counter is required to keep track of the smart pointer objects, but all smart pointers form a linked list. When the list becomes empty the raw pointer is deleted. This Model has the advantage that it does not need to allocate memory, but is prone to circular dependencies.