Commit 219a553f authored by Will Schroeder's avatar Will Schroeder
Browse files

ERR: Fixed memory leak

parent 276fec3b
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
#include "vtkObjectFactory.h" #include "vtkObjectFactory.h"
#include "vtkRenderWindowInteractor.h" #include "vtkRenderWindowInteractor.h"
vtkCxxRevisionMacro(vtkInteractorEventRecorder, "1.4"); vtkCxxRevisionMacro(vtkInteractorEventRecorder, "1.5");
vtkStandardNewMacro(vtkInteractorEventRecorder); vtkStandardNewMacro(vtkInteractorEventRecorder);
float vtkInteractorEventRecorder::StreamVersion = 1.0; float vtkInteractorEventRecorder::StreamVersion = 1.0;
vtkInteractorEventRecorder::vtkInteractorEventRecorder() vtkInteractorEventRecorder::vtkInteractorEventRecorder()
{ {
// take over the processing of delete and keypress events from the superclass //take over the processing of delete and keypress events from the superclass
this->KeyPressCallbackCommand->SetCallback( this->KeyPressCallbackCommand->SetCallback(
vtkInteractorEventRecorder::ProcessCharEvent); vtkInteractorEventRecorder::ProcessCharEvent);
...@@ -35,7 +35,7 @@ vtkInteractorEventRecorder::vtkInteractorEventRecorder() ...@@ -35,7 +35,7 @@ vtkInteractorEventRecorder::vtkInteractorEventRecorder()
this->EventCallbackCommand->SetCallback( this->EventCallbackCommand->SetCallback(
vtkInteractorEventRecorder::ProcessEvents); vtkInteractorEventRecorder::ProcessEvents);
this->FileName = 0; this->FileName = NULL;
this->State = vtkInteractorEventRecorder::Start; this->State = vtkInteractorEventRecorder::Start;
this->InputStream = NULL; this->InputStream = NULL;
...@@ -63,6 +63,12 @@ vtkInteractorEventRecorder::~vtkInteractorEventRecorder() ...@@ -63,6 +63,12 @@ vtkInteractorEventRecorder::~vtkInteractorEventRecorder()
delete this->OutputStream; delete this->OutputStream;
this->OutputStream = NULL; this->OutputStream = NULL;
} }
if ( this->InputString )
{
delete [] this->InputString;
this->InputString = NULL;
}
} }
void vtkInteractorEventRecorder::SetEnabled(int enabling) void vtkInteractorEventRecorder::SetEnabled(int enabling)
......
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