Init, errors & main callbacksSDL 3.2

SDL_Quit

Shuts down every SDL subsystem that is still running. The last SDL call of a program.

Signature

void SDL_Quit(void);

How it works

Destroy your own objects first (textures, renderer, window), then call SDL_Quit. It restores the screen mode if you changed it and releases the devices SDL opened.

It is safe to call even when SDL_Init failed, so an early return path can call it too.

Tips & pitfalls

Example

example.cpp
Official SDL wiki