Delete point時,point比原來的記憶體還大,就會出現這問題
此範例中,swprintf會重新配置記憶體
WCHAR *pDrive = new WCHAR;
TRACE("size:%d", sizeof(*pDrive));
::swprintf(pDrive , L"%s", this->m_sCurrentDrive);
this->m_PowerCycleThreadPara.drive = *pDrive;
delete pDrive;
VC 6.0 Error Msg
VC 2013 Error Msg
________________________________________ 3S CONFIDENTIALITY NOTICE: This message and all attachments may contain legally privileged and confidential information. Any unauthorized review, use or distribution by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by replying to the message and delete all copies. Thank you.
沒有留言:
張貼留言