
This policy keeps track of its replications. The SmartPointer deletes the pointer once the reference count reaches zero.
SmartPtr implementation presented in "Modern C++ Design" by Andrei Alexandrescu
Protected Types | |
| enum | { OWNERSHIP_TRANSFER = false } |
Protected Member Functions | |
| Ptr | clone (const Ptr &obj) |
| template<typename U> | |
| ReferenceCounting (const ReferenceCounting< U > &rc) | |
| ReferenceCounting () | |
| bool | release (const Ptr &) |
| void | swap (ReferenceCounting &rc) |
Friends | |
| unsigned int | getReferenceCount (const ReferenceCounting &rc) |
| class | ReferenceCounting |
|
|||||
|
|
|
|||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
|||||
|
|
1.4.3