[#bsl-weak_ptr-0d-numReferences] = xref:bsl.adoc[bsl]::xref:bsl/weak_ptr-0d.adoc[weak_ptr]::numReferences :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 the behavior of this method is the same as that of `use_count`, and the result may be unreliable in multi‐threaded code for the same reasons. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int numReferences() const noexcept; ---- == Description DEPRECATED: Use `use_count` instead. [.small]#Created with https://www.mrdocs.com[MrDocs]#