Salome HOME
22261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs
[modules/smesh.git] / src / SMDS / SMDS_UnstructuredGrid.cxx
index d3ea0b6209b38f50eb2cf7eec3763b69caecc765..16eb2537e7e08ed230422fae528e3e348073df57 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -285,8 +285,6 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
         }
       newFaceLocations->Squeeze();
       newFaces->Squeeze();
-      newFaceLocations->Register(this);
-      newFaces->Register(this);
       this->SetCells(newTypes, newLocations, newConnectivity, newFaceLocations, newFaces);
       newFaceLocations->Delete();
       newFaces->Delete();
@@ -402,6 +400,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges)
   _downArray[VTK_QUADRATIC_EDGE]          = new SMDS_DownQuadEdge(this);
   _downArray[VTK_TRIANGLE]                = new SMDS_DownTriangle(this);
   _downArray[VTK_QUADRATIC_TRIANGLE]      = new SMDS_DownQuadTriangle(this);
+  _downArray[VTK_BIQUADRATIC_TRIANGLE]    = new SMDS_DownQuadTriangle(this);
   _downArray[VTK_QUAD]                    = new SMDS_DownQuadrangle(this);
   _downArray[VTK_QUADRATIC_QUAD]          = new SMDS_DownQuadQuadrangle(this);
   _downArray[VTK_BIQUADRATIC_QUAD]        = new SMDS_DownQuadQuadrangle(this);
@@ -442,6 +441,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges)
   GuessSize[VTK_QUADRATIC_EDGE]          = nbQuadEdgeGuess;
   GuessSize[VTK_TRIANGLE]                = nbLinTriaGuess;
   GuessSize[VTK_QUADRATIC_TRIANGLE]      = nbQuadTriaGuess;
+  GuessSize[VTK_BIQUADRATIC_TRIANGLE]    = nbQuadTriaGuess;
   GuessSize[VTK_QUAD]                    = nbLinQuadGuess;
   GuessSize[VTK_QUADRATIC_QUAD]          = nbQuadQuadGuess;
   GuessSize[VTK_BIQUADRATIC_QUAD]        = nbQuadQuadGuess;
@@ -460,6 +460,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges)
   _downArray[VTK_QUADRATIC_EDGE]         ->allocate(nbQuadEdgeGuess);
   _downArray[VTK_TRIANGLE]               ->allocate(nbLinTriaGuess);
   _downArray[VTK_QUADRATIC_TRIANGLE]     ->allocate(nbQuadTriaGuess);
+  _downArray[VTK_BIQUADRATIC_TRIANGLE]   ->allocate(nbQuadTriaGuess);
   _downArray[VTK_QUAD]                   ->allocate(nbLinQuadGuess);
   _downArray[VTK_QUADRATIC_QUAD]         ->allocate(nbQuadQuadGuess);
   _downArray[VTK_BIQUADRATIC_QUAD]       ->allocate(nbQuadQuadGuess);