Typedef struct
{
UINT32 ucNumber;
String strNumber;
} HSS_SPS_USER_QRY_COND_T;
The class CSpsAppThread
{
Public:
Explicit CSpsAppThread (UINT32 key);
Virtual ~ CSpsAppThread () {};
CSpsAppThread ();
UINT32 m_usPdbaNo;
HSS_SPS_USER_QRY_COND_T m_stQryCond;
}
CSpsAppThread: : CSpsAppThread (UINT32 key)
{
.
return;
}
CSpsAppThread: : CSpsAppThread ()
{
CSpsAppThread (1);
return;
}
CSpsAppThread g_clsSpsApp;
Define g_clsSpsApp object, created two CSpsAppThread type of object, through CSpsAppThread (1) constructed object, procedure not end destructor will, but the layers of destructor, modify the string strNumber members, core, the call stack is as follows:
GDB debugging when p g_clsSpsApp. M_stQryCond strNumber, is an illegal address, but p g_clsSpsApp. M_stQryCond. StrNumber. C_str (), is an empty value ", "
Please help to look at the great god, the destructor string member is what will be the core?
CodePudding user response:
The data members m_usPdbaNo and m_stQryCond is private,