docs/man3/SDL_Quit.3
author Sam Lantinga <slouken@libsdl.org>
Wed, 08 Mar 2006 18:30:12 +0000
changeset 1486 9d77fc9d0ace
parent 181 e5bc29de3f0a
child 2283 546f7c1eb755
permissions -rw-r--r--
Re-added C runtime support for Visual C++ 5,6
slouken@181
     1
.TH "SDL_Quit" "3" "Tue 11 Sep 2001, 23:00" "SDL" "SDL API Reference" 
slouken@0
     2
.SH "NAME"
slouken@0
     3
SDL_Quit\- Shut down SDL
slouken@0
     4
.SH "SYNOPSIS"
slouken@0
     5
.PP
slouken@0
     6
\fB#include "SDL\&.h"
slouken@0
     7
.sp
slouken@0
     8
\fBvoid \fBSDL_Quit\fP\fR(\fBvoid\fR);
slouken@0
     9
.SH "DESCRIPTION"
slouken@0
    10
.PP
slouken@0
    11
\fBSDL_Quit\fP shuts down all SDL subsystems and frees the resources allocated to them\&. This should always be called before you exit\&. For the sake of simplicity you can set \fBSDL_Quit\fP as your \fBatexit\fP call, like: 
slouken@0
    12
.PP
slouken@0
    13
.nf
slouken@0
    14
\f(CWSDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO);
slouken@0
    15
atexit(SDL_Quit);
slouken@0
    16
\&.
slouken@0
    17
\&.\fR
slouken@0
    18
.fi
slouken@0
    19
.PP
slouken@0
    20
.PP
slouken@0
    21
.RS
slouken@0
    22
\fBNote:  
slouken@0
    23
.PP
slouken@0
    24
While using \fBatexit\fP maybe be fine for small programs, more advanced users should shut down SDL in their own cleanup code\&. Plus, using \fBatexit\fP in a library is a sure way to crash dynamically loaded code
slouken@0
    25
.RE
slouken@0
    26
.SH "SEE ALSO"
slouken@0
    27
.PP
slouken@0
    28
\fI\fBSDL_QuitSubsystem\fP\fR, \fI\fBSDL_Init\fP\fR
slouken@181
    29
...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:00