Commit db4c83c2 authored by Sebastien Jourdain's avatar Sebastien Jourdain Committed by Code Review
Browse files

Merge topic 'fix_memory_leak' into master

2c2d52dd Fix memory leak in ParaView due to circular reference
parents 1ae529e9 2c2d52dd
......@@ -30,8 +30,6 @@
// List of vectors per axis (depending on which one needs to be
// followed.
// Order here is X, Y, and Z.
......@@ -115,6 +113,25 @@ vtkAxisActor* vtkProp3DAxisFollower::GetAxis()
return this->Axis.GetPointer();
void vtkProp3DAxisFollower::SetViewport(vtkViewport* vp)
if(this->Viewport != vp)
// \NOTE: Don't increment the ref count of vtkViewport as it could lead to
// circular references.
this->Viewport = vp;
vtkViewport* vtkProp3DAxisFollower::GetViewport()
return this->Viewport.GetPointer();
void vtkProp3DAxisFollower::CalculateOrthogonalVectors(double rX[3], double rY[3],
double rZ[3], vtkAxisActor *axis, double *dop, vtkViewport *viewport)
......@@ -116,7 +116,7 @@ class VTKRENDERINGANNOTATION_EXPORT vtkProp3DAxisFollower
virtual int RenderVolumetricGeometry(vtkViewport *viewport);
virtual void SetViewport(vtkViewport* viewport);
vtkGetObjectMacro(Viewport, vtkViewport);
virtual vtkViewport* GetViewport();
......@@ -152,8 +152,7 @@ protected:
double ScreenOffset;
vtkWeakPointer<vtkAxisActor> Axis;
vtkViewport* Viewport;
vtkWeakPointer<vtkViewport> Viewport;
vtkProp3DAxisFollower(const vtkProp3DAxisFollower&); // Not implemented.
void operator=(const vtkProp3DAxisFollower&); // Not implemented.
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