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. |
Déclaré dans l'en-tête <cstdlib>
|
||
void free( void* ptr ); |
||
Libère l'espace précédemment alloué par
malloc()
, calloc()
ou realloc()
. Si ptr
est nulle pointeur, la fonction ne fait rien .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.
Le comportement est indéfini si
ptr
ne correspond pas à un pointeur retourné plus tôt par malloc()
, calloc()
ou realloc()
. En outre, le comportement est indéfini si la zone de mémoire désigné par ptr
a déjà été libérée, c'est-à-free()
ou realloc()
a déjà été appelée avec comme argument ptr
et aucun appel à malloc()
, calloc()
ou realloc()
abouti à un pointeur égal à ptr
après .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.
Sommaire |
[modifier] Paramètres
ptr | - | pointeur vers la mémoire à désallouer
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. |
[modifier] Retourne la valeur
(Aucun)
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.
[modifier] Exemple
This section is incomplete Reason: no example |
[modifier] Voir aussi
C documentation for free
|