Skip to content

Commit

Permalink
3ds: Free threads on close
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts committed Feb 17, 2024
1 parent d901460 commit dbdd08e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ void PltJoinThread(PLT_THREAD* thread) {
OSJoinThread(&thread->thread, NULL);
#elif defined(__3DS__)
threadJoin(thread->thread, U64_MAX);
threadFree(thread->thread);
#else
pthread_join(thread->thread, NULL);
#endif
Expand Down Expand Up @@ -230,6 +229,12 @@ void PltCloseThread(PLT_THREAD* thread) {
CloseHandle(thread->handle);
#elif defined(__vita__)
sceKernelDeleteThread(thread->handle);
#elif defined(__WIIU__)
// Thread is automatically closed after join
#elif defined(__3DS__)
threadFree(thread->thread);
#else
// Thread is automatically closed after join
#endif
}

Expand Down

0 comments on commit dbdd08e

Please sign in to comment.