[#bsl-shared_ptr-0a-use_count] = xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared_ptr]::use_count :relfileprefix: ../../ :mrdocs: Return a "snapshot" of the number of shared pointers (including this one) that share ownership of the object managed by this shared pointer. Note that 0 is returned if this shared pointer is empty. Also note that any result other than 0 may be unreliable in a multi‐threaded program, where another pointer sharing ownership in a different thread may be copied or destroyed, or a weak pointer may be locked in the case that 1 is returned (that would otherwise indicate unique ownership). == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- long use_count() const noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#