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

SDL_DestroySurface - Free a surface.

Defined in SDL3/SDL_surface.h

#include "SDL3/SDL.h"
void SDL_DestroySurface(SDL_Surface *surface);

It is safe to pass NULL to this function.

the SDL_Surface
to free.

No other thread should be using the surface when it is freed.

This function is available since SDL 3.2.0.

(3), SDL_CreateSurface(3), (3), SDL_CreateSurfaceFrom(3)

SDL 3.2.10 Simple Directmedia Layer