1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0025310: Regressions in visualization

- Memory management in the BRepMesh_FastDiscret class is changed. Now the unused face attributes is immediately removed.
This commit is contained in:
azn
2014-10-08 14:57:22 +04:00
committed by bugmaster
parent 15534713ba
commit fcf15f5ca3
11 changed files with 282 additions and 196 deletions

View File

@@ -70,12 +70,7 @@ BRepMesh_FaceAttribute::BRepMesh_FaceAttribute(
//=======================================================================
BRepMesh_FaceAttribute::~BRepMesh_FaceAttribute()
{
clearLocal();
mySurfaceVertices.Clear();
mySurfacePoints->Clear();
myClassifier.Nullify();
Clear();
myAllocator.Nullify();
}
@@ -102,19 +97,39 @@ void BRepMesh_FaceAttribute::init()
ResetStructure();
}
//=======================================================================
//function : Clear
//purpose :
//=======================================================================
void BRepMesh_FaceAttribute::Clear(
const Standard_Boolean isClearSurfaceDataOnly)
{
clearLocal(isClearSurfaceDataOnly);
mySurfaceVertices.Clear();
mySurfacePoints->Clear();
mySurface.Nullify();
myClassifier.Nullify();
}
//=======================================================================
//function : clearLocal
//purpose :
//=======================================================================
void BRepMesh_FaceAttribute::clearLocal()
void BRepMesh_FaceAttribute::clearLocal(
const Standard_Boolean isClearSurfaceDataOnly)
{
myStructure.Nullify();
myLocation2D.Clear();
myVertexEdgeMap->Clear();
myInternalEdges->Clear();
myAllocator->Reset(Standard_False);
if (!isClearSurfaceDataOnly)
{
myInternalEdges->Clear();
}
myStructure.Nullify();
myAllocator->Reset(isClearSurfaceDataOnly);
}
//=======================================================================