From 6bb8dd97b813b0c35f897f4c6b2ae14fb1533f14 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 14 Dec 2012 13:08:08 +0000 Subject: [PATCH] 21948: EDF SMESH : Memory is not freed when deleting a mesh 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SMDS/SMDS_MeshNode.cxx b/src/SMDS/SMDS_MeshNode.cxx index 309be4ceb..91fd238ec 100644 --- a/src/SMDS/SMDS_MeshNode.cxx +++ b/src/SMDS/SMDS_MeshNode.cxx @@ -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(grid->GetCellLinks()); assert(cellLinks); - if (myVtkID >= cellLinks->GetLinksSize()) - cellLinks->ResizeL(myVtkID+SMDS_Mesh::chunkSize); + cellLinks->ResizeForPoint( myVtkID ); } SMDS_MeshNode::~SMDS_MeshNode() -- 2.39.2