Commit 53d1549d authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Fixed a memory leak

Change-Id: I940414cc20f6e84600341d255744f0f4fb20440f
parent d4aedeca
......@@ -46,7 +46,7 @@ polaxes.SetMinimumAngle( -60. )
polaxes.SetMaximumAngle( 210. )
polaxes.SetNumberOfRadialAxes( 10 )
polaxes.SetNumberOfPolarAxisTicks( 9 )
polaxes.SetAutoSubdividePolarAxis( 0 )
polaxes.AutoSubdividePolarAxisOff()
polaxes.SetCamera( renderer.GetActiveCamera() )
polaxes.SetPolarLabelFormat( "%6.1f" )
polaxes.GetRadialAxesProperty().SetColor( .0, .0, 1. )
......@@ -73,6 +73,6 @@ interactor.SetRenderWindow( window )
# Start interaction
window.Render()
polaxes.SetNumberOfRadialAxes( 18 )
polaxes.AutoSubdividePolarAxisOn()
interactor.Start()
......@@ -788,6 +788,7 @@ void vtkPolarAxesActor::BuildPolarAxisTicks( double x0 )
// Use pre-set number of arcs when it is valid and no auto-subdivision was requested
delta = this->MaximumRadius / ( this->NumberOfPolarAxisTicks - 1 );
}
// Set major start and delta corresponding to range and coordinates
this->PolarAxis->SetMajorRangeStart( 0. );
this->PolarAxis->SetDeltaRangeMajor( delta );
......@@ -987,6 +988,8 @@ void vtkPolarAxesActor::SetNumberOfRadialAxes( vtkIdType n )
this->RadialAxes[i] = NULL;
}
}
delete [] this->RadialAxes;
this->RadialAxes = NULL;
}
// Create and set n radial axes of type X
......
......@@ -83,6 +83,7 @@ public:
// Default: true
vtkSetMacro( AutoSubdividePolarAxis, bool );
vtkGetMacro( AutoSubdividePolarAxis, bool );
vtkBooleanMacro( AutoSubdividePolarAxis, bool );
// Description:
// Set/Get the maximum radius of the polar coordinates.
......
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