在类的构造函数中开启线程
伪代码:
CA()
{
CreateThread(
NULL, // default security attributes
0, // use default stack size
DoXlanMsg, // thread function
this, // argument to thread function
0, // use default creation flags
&dwThreadId[i]); // returns the thread identifier
}
*** DoXlanMsg(*** lp)
{
CA* app = (CA*)lp;
if (NULL == app)
{
return 0;
}
}
为什么release版本会进入 return 0阿?在debug版本中不进.
构造函数中应该就已经开始实例化对象了阿。