Commit 179864e2 authored by David C. Lonie's avatar David C. Lonie
Browse files

Fix vtkDebugLeaks when templated classes are used.

The vtkTypeTemplate uses an RTTI generated name, which breaks
vtkDebugLeaks, which was instantiating using the actual name,
but destroying the RTTI name.

Change-Id: Iac2dc988f72aeb0e54414904199931ec8c58a7de
parent 99101fdf
......@@ -309,8 +309,9 @@ vtkObjectFactory* vtkLoad() \
VTK_OBJECT_FACTORY_NEW_BODY(thisClass)
#elif defined(VTK_DEBUG_LEAKS)
# define VTK_STANDARD_NEW_BODY(thisClass) \
vtkObjectFactory::ConstructInstance(#thisClass); \
return new thisClass;
thisClass *result = new thisClass; \
vtkObjectFactory::ConstructInstance(result->GetClassName()); \
return result;
#else
# define VTK_STANDARD_NEW_BODY(thisClass) \
return new thisClass;
......
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