From: eap Date: Fri, 14 Dec 2012 13:08:08 +0000 (+0000) Subject: 21948: EDF SMESH : Memory is not freed when deleting a mesh X-Git-Tag: pluginMGCleaner~269 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6bb8dd97b813b0c35f897f4c6b2ae14fb1533f14;p=modules%2Fsmesh.git 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 ); --- 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()