三维实体的内存问题??
本帖最后由 作者 于 2005-1-22 13:20:08 编辑 <br /><br /> 用Solid1->createBox(1000,1000,1000);则delete Solid1可以很干净地释放内存<BR>而用Solid1->ExtrudeAlongPath(Rgn,Curve);则delete Solid1只释放了一部分内存,该如何做?<BR><BR>============代码如下============<BR>if (AcDbRegion::createFromCurves(SegArr,RgnArr)!=Acad::eOk) <BR>{ for (i=0;i<SegArr.length();i++) delete (AcRxObject*)SegArr;<BR> for (i=0;i<RgnArr.length();i++) delete (AcRxObject*)RgnArr;<BR> return(NULL);<BR>}<BR><BR>Rgn=(AcDbRegion*)RgnArr;<BR>Solid1=new AcDb3dSolid;<BR>Solid1->ExtrudeAlongPath(Rgn,Curve); //............这一句是不是有内存泄漏<BR>//Solid1->CreateBox(1000,1000,1000); //............这一句不存在泄漏<BR>delete Solid1;<BR>for (i=0;i<SegArr.length();i++) delete (AcRxObject*)SegArr;<BR>for (i=0;i<RgnArr.length();i++) delete (AcRxObject*)RgnArr;<BR> 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> 用以下函数也不能解决内存问题<BR>acdbModelerStart();<BR>acdbModelerEnd();<BR>acdbAcisDeleteModelerBulletins();<BR>不知各位高手还有什么高见??
页:
[1]