diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index c3c217eca..5146d08d2 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -959,7 +959,6 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & MESSAGE (myHelper->GetMeshDS()->ShapeToIndex(quad->side[i]->Edge(e)) << " "); MESSAGE (")\n"); } - //cout << endl; #endif if (!nbSides) nbSides = nbEdgesInWire.front(); @@ -1187,10 +1186,20 @@ StdMeshers_Quadrangle_2D::CheckAnd2Dcompute (SMESH_Mesh & aMesh, faceQuadStruct::~faceQuadStruct() { - for (int i = 0; i < side.size(); i++) { - if (side[i]) delete side[i]; + for (size_t i = 0; i < side.size(); i++) { + if (side[i]) { + delete side[i]; + for (size_t j = i+1; j < side.size(); j++) + if ( side[i] == side[j] ) + side[j] = 0; + } + } + side.clear(); + + if (uv_grid) { + delete [] uv_grid; + uv_grid = 0; } - if (uv_grid) delete [] uv_grid; } namespace @@ -1527,13 +1536,9 @@ bool StdMeshers_Quadrangle_2D::ComputeQuadPref (SMESH_Mesh & aMesh, UpdateDegenUV( quad ); // arrays for normalized params - //cout<<"Dump B:"<X()<<","<Y()<<","<Z()<<")"<X()<<","<Y()<<","<Z()<<")"; - // } - // cout<