Skip to content

Commit dbdd08e

Browse files
3ds: Free threads on close
1 parent d901460 commit dbdd08e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Platform.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ void PltJoinThread(PLT_THREAD* thread) {
198198
OSJoinThread(&thread->thread, NULL);
199199
#elif defined(__3DS__)
200200
threadJoin(thread->thread, U64_MAX);
201-
threadFree(thread->thread);
202201
#else
203202
pthread_join(thread->thread, NULL);
204203
#endif
@@ -230,6 +229,12 @@ void PltCloseThread(PLT_THREAD* thread) {
230229
CloseHandle(thread->handle);
231230
#elif defined(__vita__)
232231
sceKernelDeleteThread(thread->handle);
232+
#elif defined(__WIIU__)
233+
// Thread is automatically closed after join
234+
#elif defined(__3DS__)
235+
threadFree(thread->thread);
236+
#else
237+
// Thread is automatically closed after join
233238
#endif
234239
}
235240

0 commit comments

Comments
 (0)