RefLinked Class Template Reference
Reference linking.
More...
#include <Pt/SmartPtr.h>
List of all members.
|
Protected Member Functions |
|
bool | unlink (T *object) |
| | Unlink a smart pointer from a managed object.
|
|
void | link (const RefLinked &ptr, T *object) |
| | Link a smart pointer to a managed object.
|
Detailed Description
template<typename T>
class Pt::RefLinked< T >
- Parameters:
-
| T | The managed object type |
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 si deleted. This Model has the advantage that it does not need to allocate memory, but is prone to circular dependencies.