Skip to content
Snippets Groups Projects
Commit 6bd7a254 authored by Tom Fischer's avatar Tom Fischer
Browse files

Merge pull request #540 from endJunction/FixMemoryLeaks

Fix memory leaks
parents 5b1c5fc7 461a18d4
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ VtuInterface::~VtuInterface()
MeshLib::Mesh* VtuInterface::readVTUFile(std::string const &file_name)
{
vtkSmartPointer<vtkXMLUnstructuredGridReader> reader =
vtkXMLUnstructuredGridReader::New();
vtkSmartPointer<vtkXMLUnstructuredGridReader>::New();
reader->SetFileName(file_name.c_str());
reader->Update();
......
......@@ -42,10 +42,10 @@ MeshNodeSearcher::MeshNodeSearcher(MeshLib::Mesh const& mesh,
MeshNodeSearcher::~MeshNodeSearcher()
{
std::vector<MeshNodesAlongPolyline*>::iterator it(_mesh_nodes_along_polylines.begin());
for (; it != _mesh_nodes_along_polylines.end(); ++it) {
delete (*it);
}
for (auto pointer : _mesh_nodes_along_polylines)
delete pointer;
for (auto pointer : _mesh_nodes_along_surfaces)
delete pointer;
}
std::vector<std::size_t> MeshNodeSearcher::getMeshNodeIDs(GeoLib::GeoObject const& geoObj)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment