[求助]删除新建的AcDbDatabase对象时出错
<p> char fullfileName;<br/> strcpy(fullfileName,"hzb.dwg");<br/> AcDbDatabase* pCurDb;<br/> pCurDb=acdbCurDwg();<br/> Acad::ErrorStatus es;<br/> AcDbDatabase* pDb = new AcDbDatabase(Adesk::kFalse);<br/> es=pDb->readDwgFile(fullfileName);<br/> if(es!=Acad::eOk)<br/> {<br/> ads_printf("\n The %c file was not found. ",fullfileName);<br/> delete pDb;<br/> return es;<br/> }</p><p>es=pCurDb->insert(AcGeMatrix3d::kIdentity,pDb);<br/> if( es!= Acad::eOk)<br/> {<br/> delete pCurDb;<br/> return es;<br/> }</p><p> delete pDb;<br/> return es;</p><p>为什么执行到 delete pDb就报错提示“致命错误:heap error”,其它部分执行正常,这段代码从网上摘抄的,不只哪位大侠知道原因,在下不胜感激,我用的是Autocad R14.</p>
页:
[1]