]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
21948: EDF SMESH : Memory is not freed when deleting a mesh
authoreap <eap@opencascade.com>
Fri, 14 Dec 2012 13:08:08 +0000 (13:08 +0000)
committereap <eap@opencascade.com>
Fri, 14 Dec 2012 13:08:08 +0000 (13:08 +0000)
fix leaks of cellLinks

void SMDS_MeshNode::init()
{
-  if (myVtkID >= cellLinks->GetLinksSize())
-          cellLinks->ResizeL(myVtkID+SMDS_Mesh::chunkSize);
+  cellLinks->ResizeForPoint( myVtkID );

src/SMDS/SMDS_MeshNode.cxx

index 309be4ceba8472d4ab288ed53b6acfd60bd67b57..91fd238eca0f7905157683e6f44a5d240a82c107 100644 (file)
@@ -71,8 +71,7 @@ void SMDS_MeshNode::init(int id, int meshId, int shapeId, double x, double y, do
   points->InsertPoint(myVtkID, x, y, z);
   SMDS_CellLinks *cellLinks = dynamic_cast<SMDS_CellLinks*>(grid->GetCellLinks());
   assert(cellLinks);
-  if (myVtkID >= cellLinks->GetLinksSize())
-          cellLinks->ResizeL(myVtkID+SMDS_Mesh::chunkSize);
+  cellLinks->ResizeForPoint( myVtkID );
 }
 
 SMDS_MeshNode::~SMDS_MeshNode()