long use_count() const; | (since C++11) |
Returns the number of shared_ptr instances that share ownership of the managed object, or 0 if the managed object has already been deleted, i.e. *this is empty.
(none).
The number of shared_ptr instances sharing the ownership of the managed object.
noexcept specification: noexceptexpired() may be faster than use_count().
| checks whether the referenced object was already deleted (public member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/memory/weak_ptr/use_count