free function --free the allocated memory
You can free the reserved memory area with the free function . The stdlib.h header must be include.
#include <stdlib.h> void free (void * ptr);
Free function sample
This is a sample to free the memory using the free function.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int main (void) {
// Dynamic memory allocation
int32_t length = 4;
int32_t * nums = calloc (sizeof (int32_t), capacity);
// process
// Release with free when you no longer need it
free (bytes);
}
C Language Zemi