I think I’ve spotted a bug in the implementation of thread
under windows. Currently it uses the CreateThread call,
but it should use _beginthreadex, in order to do some C lib
startup, according to the msdn docs
Indeed, since the SDL.dll links to (and uses) MSVCRT.DLL, it should call
_beginthread (not necessarily _beginthreadex) from the MS crt to create
threads. The penalty for not doing so, however, is a small memory leak per
ended thread.
I think I’ve spotted a bug in the implementation of thread
under windows. Currently it uses the CreateThread call,
but it should use _beginthreadex, in order to do some C lib
startup, according to the msdn docs
Indeed, since the SDL.dll links to (and uses) MSVCRT.DLL, it should call
_beginthread (not necessarily _beginthreadex) from the MS crt to create
threads. The penalty for not doing so, however, is a small memory leak per
ended thread.
(catching up on my email queue and TODO list here, sorry for late
replies…)
Indeed, since the SDL.dll links to (and uses) MSVCRT.DLL, it should call
_beginthread (not necessarily _beginthreadex) from the MS crt to create
threads. The penalty for not doing so, however, is a small memory leak per
ended thread.
What should Cygwin use in this case?
The same thing. SDL built under cygwin by default uses mingw, which is pure
MSVC runtime, and should use the same semantics.
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment