DirectSound Host API leaks the streaming thread handle
dechamps opened this issue · comments
This code:
portaudio/src/hostapi/dsound/pa_win_ds.c
Line 109 in 18a606e
Is incorrect - the official docs suggest the opposite:
when you use _beginthreadex and _endthreadex, you must close the thread handle by calling the Win32 CloseHandle API
This means DirectSound will leak a thread handle on every stream. This can be confirmed empirically by looking at the process Win32 handle list in e.g. Process Explorer.
I already have a fix for this in #922.