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