Commit 0ecabb4a authored by David Partyka's avatar David Partyka
Browse files

Fix debug leak of DummyController.

parent b3fde8f5
......@@ -16,7 +16,6 @@
#include "vtkObjectFactory.h"
#include "vtkMultiProcessController.h"
#include "vtkSmartPointer.h"
#include "vtkDummyController.h"
vtkStandardNewMacro(vtkPMaskPoints);
......@@ -28,10 +27,16 @@ vtkPMaskPoints::vtkPMaskPoints()
this->SetController(vtkMultiProcessController::GetGlobalController());
if(!this->Controller)
{
this->SetController(vtkSmartPointer<vtkDummyController>::New());
this->SetController(vtkDummyController::New());
}
}
vtkPMaskPoints::~vtkPMaskPoints()
{
this->Controller->Delete();
this->SetController(NULL);
}
//----------------------------------------------------------------------------
void vtkPMaskPoints::PrintSelf(ostream& os, vtkIndent indent)
{
......
......@@ -39,7 +39,7 @@ public:
protected:
vtkPMaskPoints();
~vtkPMaskPoints() {};
~vtkPMaskPoints();
virtual void InternalScatter(unsigned long*, unsigned long *, int, int);
virtual void InternalGather(unsigned long*, unsigned long*, int, int);
......
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