Commit 20d0ca90 authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Eliminated a massive memory leak

Change-Id: Ibf8d67e71d49072f2d29cc7d66c778645c97f08d
parent 6a57e2d0
......@@ -145,8 +145,8 @@ vtkPolarAxesActor::vtkPolarAxesActor() : vtkActor()
this->PolarAxisLabelTextProperty->SetFontFamilyToArial();
// Create and set radial axes
this->RadialAxes = new vtkAxisActor*[this->NumberOfRadialAxes];
for ( int i = 0; i < this->NumberOfRadialAxes; ++ i )
this->RadialAxes = new vtkAxisActor*[VTK_DEFAULT_NUMBER_OF_RADIAL_AXES];
for ( int i = 0; i < VTK_DEFAULT_NUMBER_OF_RADIAL_AXES; ++ i )
{
// Create axis of type X
this->RadialAxes[i] = vtkAxisActor::New();
......@@ -231,7 +231,7 @@ vtkPolarAxesActor::~vtkPolarAxesActor()
if ( this->RadialAxes )
{
for ( int i = 0; i < this->NumberOfRadialAxes; ++ i )
for ( int i = 0; i < VTK_DEFAULT_NUMBER_OF_RADIAL_AXES; ++ i )
{
if ( this->RadialAxes[i] )
{
......
Supports Markdown
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