Commit 8569eb92 authored by Ken Martin's avatar Ken Martin

fix an issue with debug leaks and vtkCommand

It was using string literal addresses as a lookup
assuming they would be shared when they are not
always shared.
parent 9e4cddf1
......@@ -15,11 +15,15 @@
#include "vtkCommand.h"
#include "vtkDebugLeaks.h"
#ifdef VTK_DEBUG_LEAKS
static const char *leakname = "vtkCommand or subclass";
#endif
//----------------------------------------------------------------
vtkCommand::vtkCommand():AbortFlag(0),PassiveObserver(0)
{
#ifdef VTK_DEBUG_LEAKS
vtkDebugLeaks::ConstructClass("vtkCommand or subclass");
vtkDebugLeaks::ConstructClass(leakname);
#endif
}
......@@ -31,7 +35,7 @@ void vtkCommand::UnRegister()
if (refcount <= 0)
{
#ifdef VTK_DEBUG_LEAKS
vtkDebugLeaks::DestructClass("vtkCommand or subclass");
vtkDebugLeaks::DestructClass(leakname);
#endif
delete this;
}
......
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