[vtkusers] vtkTimerLog: leaks (valgrind)

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Wed Apr 30 05:08:12 EDT 2003

Hi all,
	I have been using valgrind on TimeRenderer and TimeRenderer2 and I 
always have a leak:

==10958== 5200 bytes in 1 blocks are still reachable in loss record 24 of 44
==10958==    at 0x40166838: __builtin_vec_new (vg_clientfuncs.c:161)
==10958==    by 0x41043BB6: vtkTimerLog::AllocateLog(void) 
==10958==    by 0x41043CB7: vtkTimerLog::MarkEvent(char const *) 
==10958==    by 0x41043E33: vtkTimerLog::MarkStartEvent(char const *) 

I am using valgrind with these options:
__GL_FORCE_GENERIC_CPU=1 valgrind -v --leak-check=yes 
--show-reachable=yes --error-limit=no

Furthermore I tried also on a simplier example:

$ valgrind CommonCxxTests otherTimerLog

And this time I get:

==11367== 156 bytes in 1 blocks are still reachable in loss record 1 of 2
==11367==    at 0x40166838: __builtin_vec_new (vg_clientfuncs.c:161)
==11367==    by 0x40378AE6: vtkTimerLog::SetMaxEntries(int) 
==11367==    by 0x80736F2: otherTimerLogTest(ostream &) 
==11367==    by 0x80738D3: otherTimerLog(int, char **) 

In vtkTimerLog.h, vtkTimerLogEntry is declared as a struct outside of 
the class and the allocation is outside of the constructor. So my 
question is: Does VTK reference counting works also in that case ? Or is 
this a valgrind problem ?


More information about the vtkusers mailing list