Skip to content

SDL2/SDL_Quit: If OpenGL is dynamically loaded, it's C++ destructors will have run before SDL_Quit gets called, resulting in crashes. #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions SDL2/SDL_Quit.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ If you start a subsystem using a call to that subsystem's init function
generally, you should not be using those functions directly anyhow; use
[[SDL_Init]]() instead.

You can use this function with atexit() to ensure that it is run when your
application is shutdown, but it is not wise to do this from a library or
other dynamically loaded code.

Previous versions of this article have suggested registering [[SDL_Quit]]() with atexit() or similar APIs. Do not do this; crashes are likely to result.
== Version ==

This function is available since SDL 2.0.0.
Expand Down