boaosun 发表于 2005-1-20 11:18:00

三维实体的内存问题??

本帖最后由 作者 于 2005-1-22 13:20:08 编辑 <br /><br /> 用Solid1-&gt;createBox(1000,1000,1000);则delete Solid1可以很干净地释放内存<BR>而用Solid1-&gt;ExtrudeAlongPath(Rgn,Curve);则delete Solid1只释放了一部分内存,该如何做?<BR><BR>============代码如下============<BR>if (AcDbRegion::createFromCurves(SegArr,RgnArr)!=Acad::eOk) <BR>{ for (i=0;i&lt;SegArr.length();i++) delete (AcRxObject*)SegArr;<BR>                for (i=0;i&lt;RgnArr.length();i++) delete (AcRxObject*)RgnArr;<BR>                return(NULL);<BR>}<BR><BR>Rgn=(AcDbRegion*)RgnArr;<BR>Solid1=new AcDb3dSolid;<BR>Solid1-&gt;ExtrudeAlongPath(Rgn,Curve);               //............这一句是不是有内存泄漏<BR>//Solid1-&gt;CreateBox(1000,1000,1000);                                                //............这一句不存在泄漏<BR>delete Solid1;<BR>for (i=0;i&lt;SegArr.length();i++) delete (AcRxObject*)SegArr;<BR>for (i=0;i&lt;RgnArr.length();i++) delete (AcRxObject*)RgnArr;<BR>

树袋熊 发表于 2005-1-21 18:12:00

Unfortunately, there is no way to force this memory to be freed.<BR>For solids, the underlying geometric data object is controlled by the<BR>ASM (formerly ACIS) which does its own memory management regardless of<BR>AcDbDatabase residency.<BR>

boaosun 发表于 2005-1-22 13:19:00

用以下函数也不能解决内存问题<BR>acdbModelerStart();<BR>acdbModelerEnd();<BR>acdbAcisDeleteModelerBulletins();<BR>不知各位高手还有什么高见??
页: [1]
查看完整版本: 三维实体的内存问题??