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:
@@ -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);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Reference in New Issue
Block a user