SDL_Quit function

SDL_Quit -- Shuts down SDL

Syntax

void SDL_Quit(void);

Description

Shuts down all SDL subsystems, unloads the dynamically linked library and frees the allocated resources. This should always be called before you exit. For the sake of simplicity you can set SDL_Quit as your atexit C call:

   1 // Initialize SDL and few subsystems
   2 SDL_Init( SDL_INIT_VIDEO|SDL_INIT_AUDIO );
   3 
   4 // Setup the atexit function
   5 atexit(SDL_Quit);

Note: While using "atexit" may be be fine for small programs, more advanced users should shut down SDL in their own cleanup code. Moreover, using "atexit" in a library is a sure way to crash dynamically loaded code.

Parameters

nothing

Return value

nothing

See Also

SDL_QuitSubSystem, SDL_Init

Example

   1 // Shuts down the Simple Directmedia Library
   2 SDL_Quit();

Requirements

Header

SDL.h

Version

1.2.13

Shared object

libSDL.so

DLL

SDL.dll


CategorySDLGeneral

SDL_Quit (last edited 2008-12-11 09:59:37 by KenBull)