[#bsl-weak_ptr-0d-numReferences]
= xref:bsl.adoc[bsl]::xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]::numReferences
:relfileprefix: ../../
:mrdocs:

Return a &quot;snapshot&quot; 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&period; Note that the behavior of this method is the same as that of `use&lowbar;count`, and the result may be unreliable in multi&hyphen;threaded code for the same reasons&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;sharedptr&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
numReferences() const noexcept;
----

== Description

DEPRECATED&colon; Use `use&lowbar;count` instead&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
