SDL School

API reference / Files, memory, and strings

SDL_free

Function, SDL3

Frees memory from an SDL function.

Declaration

#include <SDL3/SDL.h>

void SDL_free(void *mem);

Parameters

memThe memory. NULL is safe.

Example

Read a file
SDL_free(cards);

See this code run in Read a file. Download the full program (.zip)

Notes

In SDL2

The name is the same.

See also