Do a final pass freeing temporary memory when we quit.

Fixes https://github.com/libsdl-org/SDL/issues/10169
This commit is contained in:
Sam Lantinga 2024-07-03 18:46:51 -07:00
parent a04596c9a7
commit 9d47daef0a
3 changed files with 4 additions and 1 deletions

View File

@ -559,6 +559,8 @@ void SDL_Quit(void)
*/
SDL_memset(SDL_SubsystemRefCount, 0x0, sizeof(SDL_SubsystemRefCount));
SDL_FlushEventMemory(0);
SDL_CleanupTLS();
SDL_FreeEnvironmentMemory();

View File

@ -143,7 +143,7 @@ const char *SDL_AllocateEventString(const char *string)
return NULL;
}
static void SDL_FlushEventMemory(Uint32 eventID)
void SDL_FlushEventMemory(Uint32 eventID)
{
SDL_LockMutex(SDL_event_memory_lock);
{

View File

@ -38,6 +38,7 @@
/* Start and stop the event processing loop */
extern int SDL_StartEventLoop(void);
extern void SDL_StopEventLoop(void);
extern void SDL_FlushEventMemory(Uint32 eventID);
extern void SDL_QuitInterrupt(void);
extern const char *SDL_AllocateEventString(const char *string);