[vtk-developers] VTK_DEBUG_LEAKS

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Jan 15 09:23:24 EST 2010


On Thu, Jan 14, 2010 at 11:50 PM, Arnaud Gelas
<arnaud_gelas at hms.harvard.edu> wrote:
> Hi Guys,
>
> I really liked the idea of VTK_DEBUG_LEAKS to know exactly which objects
> were not deleted (name of objects forgot to be deleted and number of
> instances)
> But the way it is right now it is quite difficult to get a clue on WHERE we
> forgot to delete (maybe due to the lack of hierarchical information?).
>
> Is there anyway to improve it by adding some additional information to track
> where leaks exactly come from?

I usually sort them by count number. The idea is that if a vtk object
with a count of 1 remains, it 'most of the time' means this is the
toplevel vtk object that uses others.

If you are a C#/Java/C++0xWithGarbageCollector guy, then simply switch
to vtkSmartPointer<> coding style convention.

2cts
-- 
Mathieu



More information about the vtk-developers mailing list