std::free
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <cstdlib>
|
||
void free( void* ptr ); |
||
Rilascia lo spazio precedentemente allocato da
malloc(), calloc() o realloc(). Se ptr è null-pointer, la funzione non fa nulla.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.
Il comportamento è indefinito se
ptr non corrisponde a un puntatore restituito in precedenza da malloc(), calloc() o realloc(). Inoltre, il comportamento è indefinito se l'area di memoria a cui si riferisce ptr è già stato deallocato, cioè free() o realloc() è già stato chiamato con ptr come argomento e chiamate per malloc(), calloc() o realloc() portato a un puntatore pari a ptr poi.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.
Parametri
| ptr | - | puntatore alla memoria da deallocare
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. |
Valore di ritorno
(Nessuno)
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.
Esempio
| This section is incomplete Reason: no example |
Vedi anche
C documentation for free
|