线程的析构函数为什么不执行
__fastcall CCLTP::CCLTP(bool CreateSuspended,AnsiString FileName,int Method)
: TThread(CreateSuspended)
{
this->FileName=FileName;
this->Method=Method;
this->strFileName=ExtractFileName(FileName);
this->strFilePath=ExtractFilePath(FileName);
aFileName="";
bFileName="";
g_pCLInfo=new CLInfo;
TMultiReadExclusiveWriteSynchronizer *section=new TMultiReadExclusiveWriteSynchronizer();
section->BeginWrite();
CLInfoCount++;
section->EndWrite();
delete section;
g_pCLInfo->HPHM="-" ;
g_pCLInfo->HPZL="" ;
g_pCLInfo->HPYS="无" ;
g_pCLInfo->WFXW="" ;
g_pCLInfo->DYCD="";
g_pCLInfo->XHDZT="-" ;
g_pCLInfo->SRSC="-" ;
g_pCLInfo->SFWZ="-";
}
__fastcall CCLTP::~CCLTP()
{
delete g_pCLInfo;
TMultiReadExclusiveWriteSynchronizer *section=new TMultiReadExclusiveWriteSynchronizer();
section->BeginWrite();
CLInfoCount--;
section->EndWrite();
delete section;
}
当执行完Execute后,为什么不会进入~CCLTP()?
谢谢