std::shared_ptr<T>::~shared_ptr (3) - Linux Manuals
std::shared_ptr<T>::~shared_ptr: std::shared_ptr<T>::~shared_ptr
Command to display std::shared_ptr<T>::~shared_ptr
manual in Linux: $ man 3 std::shared_ptr<T>::~shared_ptr
NAME
std::shared_ptr<T>::~shared_ptr - std::shared_ptr<T>::~shared_ptr
Synopsis
~shared_ptr();
If *this owns an object and it is the last shared_ptr owning it, the object is destroyed through the owned deleter.
After the destruction, the smart pointers that shared ownership with *this, if any, will report a use_count() that is one less than its previous value.
Notes
Unlike std::unique_ptr, the deleter of std::shared_ptr is invoked even if the managed pointer is null.
Example
This section is incomplete
Reason: no example
See also
destroys a weak_ptr
destructor (public member function of std::weak_ptr<T>)
Pages related to std::shared_ptr<T>::~shared_ptr
- std::shared_ptr<T>::get (3) - std::shared_ptr<T>::get
- std::shared_ptr<T>::operator*,std::shared_ptr<T>::operator-> (3) - std::shared_ptr<T>::operator*,std::shared_ptr<T>::operator->
- std::shared_ptr<T>::operator<< (3) - std::shared_ptr<T>::operator<<
- std::shared_ptr<T>::operator= (3) - std::shared_ptr<T>::operator=
- std::shared_ptr<T>::operator==,!=,<,<=,>,>= (3) - std::shared_ptr<T>::operator==,!=,<,<=,>,>=
- std::shared_ptr<T>::operator[] (3) - std::shared_ptr<T>::operator[]
- std::shared_ptr<T>::operatorbool (3) - std::shared_ptr<T>::operatorbool
- std::shared_ptr<T>::owner_before (3) - std::shared_ptr<T>::owner_before
- std::shared_ptr<T>::reset (3) - std::shared_ptr<T>::reset
- std::shared_ptr<T>::shared_ptr (3) - std::shared_ptr<T>::shared_ptr
- std::shared_ptr<T>::swap (3) - std::shared_ptr<T>::swap
- std::shared_ptr<T>::unique (3) - std::shared_ptr<T>::unique
- std::shared_ptr<T>::use_count (3) - std::shared_ptr<T>::use_count
- std::shared_ptr (3) - std::shared_ptr
- std::shared_future (3) - std::shared_future
- std::shared_future<T>::get (3) - std::shared_future<T>::get