创建线程
线程里面用了c的库函数。创建线程要用哪个线程函数,_beginthreadex还是CreateThread API?还是两个都可以,有什么不一样? 问题点数:20、回复次数:2Top
1 楼steedhorse(晨星)回复于 2005-04-20 12:20:40 得分 10
调用了CRT库函数,最好使用_beginthreadexTop
2 楼steedhorse(晨星)回复于 2005-04-20 12:22:26 得分 10
还是MSDN里说的更详尽:
A thread that uses functions from the static C run-time libraries should use the beginthread and endthread C run-time functions for thread management rather than CreateThread and ExitThread. Failure to do so results in small memory leaks when ExitThread is called. Note that this is not a problem with the C run-time in a DLL.Top





