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