cpp/memory/shared ptr/use count

Returns the number of different instances ( included) managing the current object. If there is no managed object, is returned.

In multithreaded environment, the value returned by is approximate (typical implementations use a memory_order_relaxed load)

Parameters
(none)

Return value
the number of std instances managing the current object or if there is no managed object.