21948: EDF SMESH : Memory is not freed when deleting a mesh

pass vector arg by reference, not by value
This commit is contained in:
eap 2012-12-14 13:15:17 +00:00
parent 56b857de47
commit b22f68bd44
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ SMDS_VtkEdge::SMDS_VtkEdge()
{ {
} }
SMDS_VtkEdge::SMDS_VtkEdge(std::vector<vtkIdType> nodeIds, SMDS_Mesh* mesh) SMDS_VtkEdge::SMDS_VtkEdge(std::vector<vtkIdType>& nodeIds, SMDS_Mesh* mesh)
{ {
init(nodeIds, mesh); init(nodeIds, mesh);
} }
@ -42,7 +42,7 @@ SMDS_VtkEdge::~SMDS_VtkEdge()
{ {
} }
void SMDS_VtkEdge::init(std::vector<vtkIdType> nodeIds, SMDS_Mesh* mesh) void SMDS_VtkEdge::init(std::vector<vtkIdType>& nodeIds, SMDS_Mesh* mesh)
{ {
SMDS_MeshEdge::init(); SMDS_MeshEdge::init();
vtkUnstructuredGrid* grid = mesh->getGrid(); vtkUnstructuredGrid* grid = mesh->getGrid();

View File

@ -35,9 +35,9 @@ class SMDS_EXPORT SMDS_VtkEdge: public SMDS_MeshEdge
public: public:
SMDS_VtkEdge(); SMDS_VtkEdge();
SMDS_VtkEdge(std::vector<vtkIdType> nodeIds, SMDS_Mesh* mesh); SMDS_VtkEdge(std::vector<vtkIdType>& nodeIds, SMDS_Mesh* mesh);
~SMDS_VtkEdge(); ~SMDS_VtkEdge();
void init(std::vector<vtkIdType> nodeIds, SMDS_Mesh* mesh); void init(std::vector<vtkIdType>& nodeIds, SMDS_Mesh* mesh);
bool ChangeNodes(const SMDS_MeshNode * node1, const SMDS_MeshNode * node2); bool ChangeNodes(const SMDS_MeshNode * node1, const SMDS_MeshNode * node2);
virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes); virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes);
virtual bool IsMediumNode(const SMDS_MeshNode* node) const; virtual bool IsMediumNode(const SMDS_MeshNode* node) const;