这样是否会出现内存泄露解决方法
这样是否会出现内存泄露C/C++ code............int a[3]int i0do{coutplease enter a variable:ci
这样是否会出现内存泄露
C/C++ code............int a[3];int i=0;do{ cout<<"please enter a variable:"; cin>>a[i]; i++; }while(i<3);........................int a[3];int i=0;do{ cout<<"please enter a variable:"; cin>>a[i]; i++; }while(i<3);............;do{ cout<<"please enter a variable:"; cin>>a[i]; i++; }while(i<3);............
这样调用
CWork::StartTask(hWnd);
释放
CWork::Release();
[解决办法]会的
release之后delete对象
[解决办法]不要用_endthread结束线程,直接return返回,然后CloseHandle
_endthread and _endthreadex cause C++ destructors pending in the thread not to be called.
另外,你这个写的有问题,如果StartWork两次或以上的话……