mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 18:07:40 +00:00
Fixed memory leak in testthread
This commit is contained in:
parent
728bf363cb
commit
dfe6efcd2d
1 changed files with 2 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <SDL3/SDL_test.h>
|
||||
|
||||
static SDL_TLSID tls;
|
||||
static SDL_Thread *thread = NULL;
|
||||
static int alive = 0;
|
||||
static int testprio = 0;
|
||||
static SDLTest_CommonState *state;
|
||||
|
@ -83,13 +84,13 @@ killed(int sig)
|
|||
SDL_Log("Killed with SIGTERM, waiting 5 seconds to exit\n");
|
||||
SDL_Delay(5 * 1000);
|
||||
alive = 0;
|
||||
SDL_WaitThread(thread, NULL);
|
||||
quit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
SDL_Thread *thread;
|
||||
|
||||
/* Initialize test framework */
|
||||
state = SDLTest_CommonCreateState(argv, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue