mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 03:48:14 +00:00
Do a final pass freeing temporary memory when we quit.
Fixes https://github.com/libsdl-org/SDL/issues/10169
This commit is contained in:
@@ -559,6 +559,8 @@ void SDL_Quit(void)
|
|||||||
*/
|
*/
|
||||||
SDL_memset(SDL_SubsystemRefCount, 0x0, sizeof(SDL_SubsystemRefCount));
|
SDL_memset(SDL_SubsystemRefCount, 0x0, sizeof(SDL_SubsystemRefCount));
|
||||||
|
|
||||||
|
SDL_FlushEventMemory(0);
|
||||||
|
|
||||||
SDL_CleanupTLS();
|
SDL_CleanupTLS();
|
||||||
|
|
||||||
SDL_FreeEnvironmentMemory();
|
SDL_FreeEnvironmentMemory();
|
||||||
|
@@ -143,7 +143,7 @@ const char *SDL_AllocateEventString(const char *string)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SDL_FlushEventMemory(Uint32 eventID)
|
void SDL_FlushEventMemory(Uint32 eventID)
|
||||||
{
|
{
|
||||||
SDL_LockMutex(SDL_event_memory_lock);
|
SDL_LockMutex(SDL_event_memory_lock);
|
||||||
{
|
{
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
/* Start and stop the event processing loop */
|
/* Start and stop the event processing loop */
|
||||||
extern int SDL_StartEventLoop(void);
|
extern int SDL_StartEventLoop(void);
|
||||||
extern void SDL_StopEventLoop(void);
|
extern void SDL_StopEventLoop(void);
|
||||||
|
extern void SDL_FlushEventMemory(Uint32 eventID);
|
||||||
extern void SDL_QuitInterrupt(void);
|
extern void SDL_QuitInterrupt(void);
|
||||||
|
|
||||||
extern const char *SDL_AllocateEventString(const char *string);
|
extern const char *SDL_AllocateEventString(const char *string);
|
||||||
|
Reference in New Issue
Block a user