Commit c3c88a4b authored by Ken Martin's avatar Ken Martin
Browse files

fixed memory leak

parent 971b2ba6
......@@ -35,6 +35,7 @@ class vtkCamera : public vtkObject
{
public:
vtkCamera();
~vtkCamera();
void PrintSelf(ostream& os, vtkIndent indent);
char *GetClassName() {return "vtkCamera";};
......
......@@ -31,6 +31,7 @@ class vtkLight : public vtkObject
{
public:
vtkLight();
~vtkLight();
char *GetClassName() {return "vtkLight";};
void PrintSelf(ostream& os, vtkIndent indent);
......
......@@ -38,6 +38,7 @@ class vtkProperty : public vtkObject
{
public:
vtkProperty();
~vtkProperty();
char *GetClassName() {return "vtkProperty";};
void PrintSelf(ostream& os, vtkIndent indent);
......
......@@ -38,6 +38,7 @@ class vtkTexture : public vtkObject
{
public:
vtkTexture();
~vtkTexture();
char *GetClassName() {return "vtkTexture";};
void PrintSelf(ostream& os, vtkIndent indent);
......
......@@ -62,6 +62,14 @@ vtkCamera::vtkCamera()
this->Device = NULL;
}
vtkCamera::~vtkCamera()
{
if (this->Device)
{
delete this->Device;
}
}
void vtkCamera::Render(vtkRenderer *ren)
{
if (!this->Device)
......
......@@ -49,6 +49,14 @@ vtkLight::vtkLight()
this->Device = NULL;
}
vtkLight::~vtkLight()
{
if (this->Device)
{
delete this->Device;
}
}
void vtkLight::Render(vtkRenderer *ren,int light_index)
{
if (!this->Device)
......
......@@ -58,6 +58,14 @@ vtkProperty::vtkProperty()
this->Device = NULL;
}
vtkProperty::~vtkProperty()
{
if (this->Device)
{
delete this->Device;
}
}
void vtkProperty::Render(vtkRenderer *ren)
{
if (!this->Device)
......
......@@ -30,6 +30,14 @@ vtkTexture::vtkTexture()
this->Device = NULL;
}
vtkTexture::~vtkTexture()
{
if (this->Device)
{
delete this->Device;
}
}
void vtkTexture::Load(vtkRenderer *ren)
{
if (!this->Device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment