SmartPointer s using this policy are invalidated when copied. This ensures that only one SmartPointer to an object exists.
SmartPtr implementation presented in "Modern C++ Design" by Andrei Alexandrescu
Protected Types | |
| enum | { OWNERSHIP_TRANSFER = true } |
Protected Member Functions | |
| template<typename U> | |
| DestructiveCopy (const DestructiveCopy< U > &) | |
| DestructiveCopy () | |
Static Protected Member Functions | |
| template<typename U> | |
| static Ptr | clone (U &obj) |
| static bool | release (const Ptr &) |
| static void | swap (DestructiveCopy &) |
|
|||||
|
|
|
|||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
1.4.3