From 35a3bbaa905e53889bc78c1aea7ad4719a81fb3d Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Thu, 3 Jan 2013 08:35:13 +0100 Subject: [PATCH] Reducing include dependencies and mem leak in VtkPointsSource. --- Gui/VtkVis/VtkPointsSource.cpp | 4 ++++ Gui/VtkVis/VtkPointsSource.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Gui/VtkVis/VtkPointsSource.cpp b/Gui/VtkVis/VtkPointsSource.cpp index 68a0336ed1d..477f4cbea37 100644 --- a/Gui/VtkVis/VtkPointsSource.cpp +++ b/Gui/VtkVis/VtkPointsSource.cpp @@ -10,6 +10,9 @@ */ // ** INCLUDES ** +// GeoLib +#include "Color.h" + #include "VtkPointsSource.h" #include <vtkCellArray.h> @@ -35,6 +38,7 @@ VtkPointsSource::VtkPointsSource() const GeoLib::Color* c = GeoLib::getRandomColor(); GetProperties()->SetColor((*c)[0] / 255.0,(*c)[1] / 255.0,(*c)[2] / 255.0); + delete c; } void VtkPointsSource::PrintSelf( ostream& os, vtkIndent indent ) diff --git a/Gui/VtkVis/VtkPointsSource.h b/Gui/VtkVis/VtkPointsSource.h index 21c511caf4d..0ad5891444d 100644 --- a/Gui/VtkVis/VtkPointsSource.h +++ b/Gui/VtkVis/VtkPointsSource.h @@ -16,7 +16,8 @@ #include "VtkAlgorithmProperties.h" #include <vtkPolyDataAlgorithm.h> -#include "GEOObjects.h" +// GeoLib +#include "Point.h" /** * \brief VtkPointsSource is a VTK source object for the visualization -- GitLab