高手请指点!!!!!经常遇到的问题
出现内存错误!!!!!!!!为什么老是出现这个问题????// ObjectARX defined commands, created by, ,
#include "StdAfx.h"
#include "StdArx.h"
#include "geassign.h"
//-----------------------------------------------------------------------------
// This is command 'CREATETEXT, by, ,
void zzxcreateText()
{
#ifdef OARXWIZDEBUG
acutPrintf ("\nOARXWIZDEBUG - zzxcreateText() called.");
#endif // OARXWIZDEBUG
// TODO: Implement the command
ads_point ptOrigion;
char string;
AcDbObjectId objId;
acedGetPoint(NULL,"please insert the point:",ptOrigion);
acedGetString(1,"please input the contend:",string);
AcDbText* pText = new AcDbText(asPnt3d(ptOrigion),string);
AcDbBlockTable* pBlkTbl;
acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlkTbl,AcDb::kForRead);
AcDbBlockTableRecord* pBlkTblRecord;
pBlkTbl->getAt(ACDB_MODEL_SPACE,pBlkTblRecord,AcDb::kForWrite);
pBlkTblRecord->appendAcDbEntity(objId,pText);
pBlkTbl->close();
pBlkTblRecord->close();
}
有没有人帮帮忙啊 问题已经解决!实体指针忘记关闭了,哎小错误耽误大事
页:
[1]