Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't leak DirectSound thread handles
The previous code refrained from calling CloseHandle on _beingthreadex()-created threads, citing "documentation". Actually the official docs suggest the exact opposite: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/endthread-endthreadex > when you use _beginthreadex and _endthreadex, you must close the > thread handle by calling the Win32 CloseHandle API This means the previous code would leak the thread handle. This can be confirmed empirically by looking at the process Win32 handle list in e.g. Process Explorer.
- Loading branch information