fixed memory leaks
This commit is contained in:
parent
70afbbcdfc
commit
4e60a749e9
@ -72,6 +72,7 @@ vtkTypeBool DihedralAnglesFilter::RequestData(
|
|||||||
|
|
||||||
i += 6;
|
i += 6;
|
||||||
}
|
}
|
||||||
|
it->Delete();
|
||||||
AverageMinDegrees /= input->GetNumberOfCells();
|
AverageMinDegrees /= input->GetNumberOfCells();
|
||||||
AverageMinDegrees = AverageMinDegrees * 180. / 3.141592653589793;
|
AverageMinDegrees = AverageMinDegrees * 180. / 3.141592653589793;
|
||||||
MinMinDegrees = MinMinDegrees * 180. / 3.141592653589793;
|
MinMinDegrees = MinMinDegrees * 180. / 3.141592653589793;
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
|
|
||||||
vtkSmartPointer<vtkAlgorithm> readerFromFileName(const char *fileName) {
|
vtkAlgorithm *readerFromFileName(const char *fileName) {
|
||||||
std::string extension =
|
std::string extension =
|
||||||
vtksys::SystemTools::GetFilenameLastExtension(fileName);
|
vtksys::SystemTools::GetFilenameLastExtension(fileName);
|
||||||
if (extension == ".vtk") {
|
if (extension == ".vtk") {
|
||||||
@ -148,5 +148,7 @@ int main(int argc, char **argv) {
|
|||||||
renderWindow->Render();
|
renderWindow->Render();
|
||||||
renderWindowInteractor->Start();
|
renderWindowInteractor->Start();
|
||||||
#endif
|
#endif
|
||||||
|
tetMeshReader->Delete();
|
||||||
|
polyMeshReader->Delete();
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ vtkTypeBool RemoveExternalCellsFilter::RequestData(
|
|||||||
outCells->InsertNextCell(it->GetPointIds());
|
outCells->InsertNextCell(it->GetPointIds());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
it->Delete();
|
||||||
output->SetCells(VTK_TETRA, outCells);
|
output->SetCells(VTK_TETRA, outCells);
|
||||||
output->SetPoints(tetMesh->GetPoints());
|
output->SetPoints(tetMesh->GetPoints());
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ vtkTypeBool SurfacePointsFilter::RequestData(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
it->Delete();
|
||||||
surfacePoints->Allocate(surfacePointsSet.size());
|
surfacePoints->Allocate(surfacePointsSet.size());
|
||||||
for (const vtkIdType &id : surfacePointsSet) {
|
for (const vtkIdType &id : surfacePointsSet) {
|
||||||
surfacePoints->InsertNextValue(id);
|
surfacePoints->InsertNextValue(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user