std::shared_ptr::use_count
From Cppreference
< cpp | memory | shared ptr
long use_count() const;
|
||
Returns the number of different shared_ptr instances (this included) managing the current object. If there is no managed object, 0 is returned.
Contents |
[edit] Parameters
(none)
[edit] Return value
the number of shared_ptr instances managing the current object or 0 if there is no managed object.
[edit] Example
This section is incomplete |
[edit] See also
|
checks whether the managed object is managed only by the current shared_ptr instance (public member function) |