also in ARX it's the same! the section "generateSectionGeometry" also used with acdbAcisDeleteModelerBulletins don't restore the memory.
try a loop and wait a crash...
this is arx..
ACED_ARXCOMMAND_ENTRY_AUTO(CSectionPlaneApp, AsdkSectionPlane, _CreaSez, CreaSez, ACRX_CMD_TRANSPARENT, NULL)
static void AsdkSectionPlane_CreaSez(void)
{
// Get two points in the plane
ads_point pnt;
int iTest = acedGetPoint(NULL,_T("\nSelect first point of the line in the plane: "),pnt);
if(iTest != RTNORM)
return;
AcGePoint3d startPnt(pnt[X],pnt[Y],pnt[Z]);
// transform the selected point to wcs
AcGeMatrix3d ucsMat;
startPnt.transformBy(ucsMat);
AcGePoint3dArray sectVertices;
sectVertices.append(startPnt);
AcGePoint3d endPnt;
iTest = acedGetPoint(pnt,_T("\nSelect second point of the line in the plane: "),asDblArray(endPnt));
if(iTest != RTNORM)
return;
// transform the selected point to wcs
endPnt.transformBy(ucsMat);
sectVertices.append(endPnt);
Acad::ErrorStatus es;
ads_name name;
ads_point pt;
acedEntSel(_T("\nSeleziona solido"), name, pt);
AcDbObjectId objId;
acdbGetObjectId(objId, name);
// AcDbObject * pObj;
//AcDbObjectId sectionId = pSection->objectId();
AcGeVector3d vv;
vv = sectVertices[1]-sectVertices[0];
for (int kkk=0;kkk<10000;kkk++)
{
AcDbSection* pSection = new AcDbSection(sectVertices, AcGeVector3d::kZAxis);
if(pSection==NULL)
return;
if(Acad::eOk != (pSection->setState(AcDbSection::kPlane)))
return;
/*AcDbObjectId sectionId = AcDbObjectId::kNull;
sectionId = CSectionPlaneUtility::AddEntityToDatabase(pSection);
if(sectionId == AcDbObjectId::kNull)
return;*/
AcString sectName = _T("FirstSection");
if(Acad::eOk != (pSection->setName(sectName)))
return;
if(Acad::eOk != (pSection->setIndicatorTransparency(90)))
return;
if(Acad::eOk != (pSection->setHeight(AcDbSection::kHeightAboveSectionLine, 3.0)))
return;
if(Acad::eOk != (pSection->setHeight(AcDbSection::kHeightBelowSectionLine, 1.0)))
return;
/*if(Acad::eOk != (pSection->enableLiveSection(true)))
return;*/
AcArray boundaryList, fillList, backgroundList, foregroundList, tangentList;
//AcDbEntity *pEnt = NULL;
/*for (int i = 0; i < solidIds.length(); i++)
{*/
AcArray boundarySet, fillSet, backgroundSet;
AcArray foregroundSet, tangentSet;
AcDbEntity *pEnt = NULL;
AcArray entList;
// es = acdbOpenObject(pEnt, solidIds
, AcDb::kForRead);
es = acdbOpenObject(pEnt, objId, AcDb::kForRead);
if (es == eOk)
{
es = pSection->generateSectionGeometry(pEnt,
boundarySet, fillSet, backgroundSet,
foregroundSet, tangentSet);
pEnt->close();
entList.append(boundarySet);
entList.append(fillSet);
entList.append(backgroundSet);
entList.append(foregroundSet);
entList.append(tangentSet);
}
//}
pSection->close();
pSection=NULL;
}
}
here i found peoples with similar problems
http://www.caduser.ru/forum/index.php?PAGE_NAME=read&FID=24&TID=29706&MID=169545&phrase_id=235951#message169545