The smart pointer library provides five smart pointer class templates:
| Smart Pointer |
Description |
| scoped_ptr |
Simple sole ownership of single objects. Non-copyable. |
| scoped_array |
Simple sole ownership of arrays. Non-copyable. |
| shared_ptr |
Object ownership shared among multiple pointers |
| shared_array |
Array ownership shared among multiple pointers. |
| weak_ptr |
Non-owning observers of an object owned by shared_ptr.
|
| intrusive_ptr |
Shared ownership of objects with an embedded reference count. |
These templates are designed to complement the std::auto_ptr template.
Give
feedback of this article