std::free
De 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. |
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <cstdlib>
|
||
void free( void* ptr ); |
||
Desaloca o espaço previamente alocado por
malloc(), calloc() ou realloc(). Se ptr é ponteiro nulo, a função não faz nada.Original:
Deallocates the space previously allocated by
malloc(), calloc() or realloc(). If ptr is null-pointer, the function does nothing.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.
O comportamento é indefinido se
ptr não corresponde a um ponteiro retornado antes por malloc(), calloc() ou realloc(). Além disso, o comportamento é indefinido se a área de memória designado por ptr já foi desalocado, isto é, ou free() realloc() já foi chamado com ptr como argumento e nenhuma chamada para malloc(), calloc() ou realloc() resultou em um ponteiro igual a ptr depois.Original:
The behavior is undefined if
ptr does not match a pointer returned earlier by malloc(), calloc() or realloc(). Also, the behavior is undefined if the memory area referred to by ptr has already been deallocated, that is, free() or realloc() has already been called with ptr as the argument and no calls to malloc(), calloc() or realloc() resulted in a pointer equal to ptr afterwards.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.
Parâmetros
| ptr | - | ponteiro para a memória para desalocar
Original: pointer to the memory to deallocate The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Valor de retorno
(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.
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |
Veja também
Documentação C para free
|