mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-31 14:29:14 +08:00
test: plug leaks of testmouse and testrwlock
This commit is contained in:
committed by
Anonymous Maarten
parent
3ba9bdfc01
commit
17a891daa8
@@ -345,6 +345,11 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
while (active) {
|
||||||
|
Object *next = active->next;
|
||||||
|
SDL_free(next);
|
||||||
|
active = next;
|
||||||
|
}
|
||||||
SDL_DestroyRenderer(loop_data.renderer);
|
SDL_DestroyRenderer(loop_data.renderer);
|
||||||
SDL_DestroyWindow(window);
|
SDL_DestroyWindow(window);
|
||||||
|
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ int main(int argc, char *argv[])
|
|||||||
for (i = 0; i < nb_threads; ++i) {
|
for (i = 0; i < nb_threads; ++i) {
|
||||||
SDL_WaitThread(threads[i], NULL);
|
SDL_WaitThread(threads[i], NULL);
|
||||||
}
|
}
|
||||||
|
SDL_free(threads);
|
||||||
|
|
||||||
SDL_Log("Reader threads have terminated, quitting!");
|
SDL_Log("Reader threads have terminated, quitting!");
|
||||||
SDL_DestroyRWLock(rwlock);
|
SDL_DestroyRWLock(rwlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user