getBlockTable delete pline
AcDbBlockTable *pBlkTab;
Acad::ErrorStatus es = acdbHostApplicationServices()->workingDatabase()
->getBlockTable(pBlkTab, AcDb::kForWrite);
if (Acad::eOk != es)
{
return AcDbObjectId::kNull;
}
getBlockTable(pBlkTab, AcDb::kForWrite); 当getblocktable 失败后 pblktable 未打开 不需要close;
es=pBlkTabRcd->appendAcDbEntity(pline);
if (es != Acad::eOk)
{
pBlkTabRcd->close();
delete(pline);
pline->close();
acutPrintf(_T("\n生成块失败."));
return;
}
pline->close();
pline 添加入块失败时 则CAD未获得pine的操作 应当delete