std::weak_ptr::use_count
Da 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; |
(desde C++11) | |
Retorna o número de instâncias
shared_ptr
que a posse de partes do objeto gerenciado, ou 0 se o objeto gerenciado já foi eliminado, ou seja, *this está vazia.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.
Índice |
[editar] Parâmetros
(Nenhum)
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.
[editar] Valor de retorno
O número de instâncias
shored_ptr
compartilhar a propriedade do objeto gerenciado.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.
[editar] Exceções
[editar] Notas
expired()
pode ser mais rápida do que 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.
[editar] Exemplo
Esta seção está incompleta Motivo: sem exemplo |
[editar] Veja também
Verifica se o objeto referenciado já foi excluído Original: checks whether the referenced object was already deleted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) |