程序中有一段:
BYTE *pThreshold2;
CString strTemp;
strTemp.Format("%d\n%d",Height,widthDW8);
AfxMessageBox(strTemp);
Threshold2=new BYTE[Height*widthDW8];
AfxMessageBox("2");
delete []pThreshold2;Debug下一点问题都莫的,release运行的,第一个对话框能弹出,看到Height,widthDW8值为2333,1786,,,然后第二个对话框没弹出,程序报runtime error,,,请大家帮帮忙,谢了.
BYTE *pThreshold2;
CString strTemp;
strTemp.Format("%d\n%d",Height,widthDW8);
AfxMessageBox(strTemp);
Threshold2=new BYTE[Height*widthDW8];
AfxMessageBox("2");
delete []pThreshold2;Debug下一点问题都莫的,release运行的,第一个对话框能弹出,看到Height,widthDW8值为2333,1786,,,然后第二个对话框没弹出,程序报runtime error,,,请大家帮帮忙,谢了.
void CDlgTest01Dlg::OnButton1()
{
// TODO: Add your control notification handler code here
int Height, widthDW8;
Height = 2333;
widthDW8 = 1786;
BYTE *pThreshold2;
CString strTemp;
strTemp.Format("%d\n%d",Height,widthDW8);
AfxMessageBox(strTemp);
pThreshold2=new BYTE[Height*widthDW8];
AfxMessageBox("2");
delete []pThreshold2;
}debug和release下都没有问题。