std::weak_ptr::use_count
Aus cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
long use_count() const; |
(seit C++11) | |
Gibt die Anzahl der
shared_ptr
Instanzen Aktienbesitz des verwalteten Objekt oder 0, wenn das verwaltete Objekt bereits gelöscht wurde, dh *this ist leer .Original:
Returns the number of
shared_ptr
instances that share ownership of the managed object, or 0 if the managed object has already been deleted, i.e. *this is empty.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Inhaltsverzeichnis |
[Bearbeiten] Parameter
(None)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Rückgabewert
Die Zahl der
shored_ptr
Fällen teilen sich das Eigentum an dem verwalteten Objekt .Original:
The number of
shored_ptr
instances sharing the ownership of the managed object.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Ausnahmen
[Bearbeiten] Notes
expired()
kann schneller sein als use_count()
.Original:
expired()
may be faster than use_count()
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Beispiel
This section is incomplete Reason: no example |
[Bearbeiten] Siehe auch
prüft, ob das referenzierte Objekt bereits gelöscht wurde (öffentliche Elementfunktion) |