Go to the first, previous, next, last section, table of contents.


free

Syntax

#include <stdlib.h>

void free(void *ptr);

Description

Returns the allocated memory to the heap (see section malloc). If the ptr is NULL, it does nothing.

Return Value

None.

Portability

ANSI, POSIX

Example

char *q = (char *)malloc(20);
free(q);


Go to the first, previous, next, last section, table of contents.