From: eap Date: Fri, 14 Dec 2012 13:15:17 +0000 (+0000) Subject: 21948: EDF SMESH : Memory is not freed when deleting a mesh X-Git-Tag: pluginMGCleaner~266 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b22f68bd44279501760aed12f6ed98cf8f1c36d7;p=modules%2Fsmesh.git 21948: EDF SMESH : Memory is not freed when deleting a mesh pass vector arg by reference, not by value --- diff --git a/src/SMDS/SMDS_VtkEdge.cxx b/src/SMDS/SMDS_VtkEdge.cxx index cb324014e..d3cf38655 100644 --- a/src/SMDS/SMDS_VtkEdge.cxx +++ b/src/SMDS/SMDS_VtkEdge.cxx @@ -33,7 +33,7 @@ SMDS_VtkEdge::SMDS_VtkEdge() { } -SMDS_VtkEdge::SMDS_VtkEdge(std::vector nodeIds, SMDS_Mesh* mesh) +SMDS_VtkEdge::SMDS_VtkEdge(std::vector& nodeIds, SMDS_Mesh* mesh) { init(nodeIds, mesh); } @@ -42,7 +42,7 @@ SMDS_VtkEdge::~SMDS_VtkEdge() { } -void SMDS_VtkEdge::init(std::vector nodeIds, SMDS_Mesh* mesh) +void SMDS_VtkEdge::init(std::vector& nodeIds, SMDS_Mesh* mesh) { SMDS_MeshEdge::init(); vtkUnstructuredGrid* grid = mesh->getGrid(); diff --git a/src/SMDS/SMDS_VtkEdge.hxx b/src/SMDS/SMDS_VtkEdge.hxx index c5f04300b..ff28a3af6 100644 --- a/src/SMDS/SMDS_VtkEdge.hxx +++ b/src/SMDS/SMDS_VtkEdge.hxx @@ -35,9 +35,9 @@ class SMDS_EXPORT SMDS_VtkEdge: public SMDS_MeshEdge public: SMDS_VtkEdge(); - SMDS_VtkEdge(std::vector nodeIds, SMDS_Mesh* mesh); + SMDS_VtkEdge(std::vector& nodeIds, SMDS_Mesh* mesh); ~SMDS_VtkEdge(); - void init(std::vector nodeIds, SMDS_Mesh* mesh); + void init(std::vector& nodeIds, SMDS_Mesh* mesh); bool ChangeNodes(const SMDS_MeshNode * node1, const SMDS_MeshNode * node2); virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes); virtual bool IsMediumNode(const SMDS_MeshNode* node) const;