Allow passing a pointer to SDL_FreeEventMemory()

Also clarify in the documentation that you should not call SDL_FreeEventMemory(NULL) from your main thread.
This commit is contained in:
Sam Lantinga
2024-07-18 10:32:13 -07:00
parent 217330a7b3
commit 2816745f48
4 changed files with 54 additions and 14 deletions

View File

@@ -520,6 +520,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetTLS(SDL_TLSID *id, const void *value, SDL
/**
* Cleanup all TLS data for this thread.
*
* If you are creating your threads outside of SDL and then calling SDL functions, you should call this function before your thread exits, to properly clean up SDL memory.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.