std::shared_ptr::~shared_ptr - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::shared_ptr::~shared_ptr

From cppreference.com
< cpp‎ | memory‎ | shared ptr

~shared_ptr(); |  |

If `*this` owns an object and it is the last `shared_ptr` owning it, the object is destroyed through the owned deleter. Otherwise does nothing.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/memory/shared_ptr/%7Eshared_ptr&oldid=50183"
Category:

- Todo no example