• David C. Lonie's avatar
    Refactor vtkDebugLeaks construction. · e5c793db
    David C. Lonie authored
    vtkDebugLeaks registers instance by class name, which worked well for
    many years. However, now that we have more templated code, this is
    becoming difficult. For instance, "template <typename T> vtkBuffer<T>"
    would be identified as "vtkBuffer<T>" when registering with
    vtkDebugLeaks, but deregistered with the compiler dependent
    typeid(vtkBuffer<T>).name() string returned from GetClassName().
    
    This patch moves vtkDebugLeaks registrations to the method
    vtkObjectBase::InitializeObjectBase(), which must be called after the
    vtkObjectBase is instantiated. This ensures that objects are
    registered using the same string as when they are destroyed. In
    general, a call to "new vtkSomeClass" must be followed by a call to
    InitializeObjectBase on the new instance. The common ::New()
    implementation macros in vtkObjectFactory will ensure that
    registration happens correctly.
    
    Two notable exceptions are vtkCommand and vtkInformationKey
    subclasses. These do not require any specific handling for
    vtkDebugLeaks registration.
    
    See discussion at:
    
    http://vtk.1045678.n5.nabble.com/Proposal-Simplify-vtkDebugLeaks-registration-td5740222.html
    e5c793db
Name
Last commit
Last update
..
Testing Loading commit data...
CMakeLists.txt Loading commit data...
module.cmake Loading commit data...
vtkBiomTableReader.cxx Loading commit data...
vtkBiomTableReader.h Loading commit data...
vtkChacoGraphReader.cxx Loading commit data...
vtkChacoGraphReader.h Loading commit data...
vtkDIMACSGraphReader.cxx Loading commit data...
vtkDIMACSGraphReader.h Loading commit data...
vtkDIMACSGraphWriter.cxx Loading commit data...
vtkDIMACSGraphWriter.h Loading commit data...
vtkDelimitedTextReader.cxx Loading commit data...
vtkDelimitedTextReader.h Loading commit data...
vtkFixedWidthTextReader.cxx Loading commit data...
vtkFixedWidthTextReader.h Loading commit data...
vtkISIReader.cxx Loading commit data...
vtkISIReader.h Loading commit data...
vtkMultiNewickTreeReader.cxx Loading commit data...
vtkMultiNewickTreeReader.h Loading commit data...
vtkNewickTreeReader.cxx Loading commit data...
vtkNewickTreeReader.h Loading commit data...
vtkNewickTreeWriter.cxx Loading commit data...
vtkNewickTreeWriter.h Loading commit data...
vtkPhyloXMLTreeReader.cxx Loading commit data...
vtkPhyloXMLTreeReader.h Loading commit data...
vtkPhyloXMLTreeWriter.cxx Loading commit data...
vtkPhyloXMLTreeWriter.h Loading commit data...
vtkRISReader.cxx Loading commit data...
vtkRISReader.h Loading commit data...
vtkTulipReader.cxx Loading commit data...
vtkTulipReader.h Loading commit data...
vtkXGMLReader.cxx Loading commit data...
vtkXGMLReader.h Loading commit data...
vtkXMLTreeReader.cxx Loading commit data...
vtkXMLTreeReader.h Loading commit data...