zzxxing 发表于 2008-7-9 18:26:00

高手请指点!!!!!经常遇到的问题

本帖最后由 作者 于 2008-7-9 18:26:51 编辑 <br /><br /> <p>出现内存错误!!!!!!!!为什么老是出现这个问题????</p><p>// ObjectARX defined commands, created by&nbsp; , , </p><p>#include "StdAfx.h"<br/>#include "StdArx.h"<br/>#include "geassign.h"</p><p>//-----------------------------------------------------------------------------<br/>// This is command 'CREATETEXT, by&nbsp; , , <br/>void zzxcreateText()<br/>{<br/>#ifdef OARXWIZDEBUG<br/>&nbsp;acutPrintf ("\nOARXWIZDEBUG - zzxcreateText() called.");<br/>#endif // OARXWIZDEBUG</p><p>&nbsp;// TODO: Implement the command<br/>&nbsp;ads_point ptOrigion;<br/>&nbsp;char string;<br/>&nbsp;AcDbObjectId objId;<br/>&nbsp;acedGetPoint(NULL,"please insert the point:",ptOrigion);<br/>&nbsp;acedGetString(1,"please input the contend:",string);<br/>&nbsp;AcDbText* pText = new AcDbText(asPnt3d(ptOrigion),string);<br/>&nbsp;AcDbBlockTable* pBlkTbl;<br/>&nbsp;acdbHostApplicationServices()-&gt;workingDatabase()-&gt;getSymbolTable(pBlkTbl,AcDb::kForRead);<br/>&nbsp;AcDbBlockTableRecord* pBlkTblRecord;<br/>&nbsp;pBlkTbl-&gt;getAt(ACDB_MODEL_SPACE,pBlkTblRecord,AcDb::kForWrite);<br/>&nbsp;pBlkTblRecord-&gt;appendAcDbEntity(objId,pText);<br/>&nbsp;pBlkTbl-&gt;close();<br/>&nbsp;pBlkTblRecord-&gt;close();</p><p>}<br/></p>

zzxxing 发表于 2008-7-9 18:33:00

有没有人帮帮忙啊

zzxxing 发表于 2008-7-10 18:04:00

<p>问题已经解决!实体指针忘记关闭了,哎小错误耽误大事</p>
页: [1]
查看完整版本: 高手请指点!!!!!经常遇到的问题