DOKK / manpages / debian 13 / libsdl3-doc / SDL_free.3.en
SDL_free(3) SDL3 FUNCTIONS SDL_free(3)

SDL_free - Free allocated memory.

Defined in SDL3/SDL_stdinc.h

#include "SDL3/SDL.h"
void SDL_free(void *mem);

The pointer is no longer valid after this call and cannot be dereferenced anymore.

If mem is NULL, this function does nothing.

a pointer to allocated memory, or NULL.

It is safe to call this function from any thread.

This function is available since SDL 3.2.0.

(3), SDL_malloc(3), (3), SDL_calloc(3), (3), SDL_realloc(3)

SDL 3.2.10 Simple Directmedia Layer