[#bsl-weak_ptr-0d-use_count] = xref:bsl.adoc[bsl]::xref:bsl/weak_ptr-0d.adoc[weak_ptr]::use_count :relfileprefix: ../../ :mrdocs: Return a "snapshot" of the current number of shared pointers that share ownership of the object referred to by this weak pointer, or 0 if this weak pointer is in the empty state. 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 another 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]#