[vtkusers] Memory Leak in vtkTimerLog ??

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Tue Oct 7 11:05:17 EDT 2003


look at:

http://vtk.org/pipermail/vtkusers/2003-August/019521.html

It's in  BugTracking -> #138

mathieu

de Boer Ingo wrote:
> Hi,
> 
> maybe it's in my programming, but I have a memory leak of
> 5200 Bytes. My debugger (.net 2002 studio) told me that the
> leak is around the vtkTimerLog
> 
> //----------------------------------------------------------------------------
> // Allocate timing table with MaxEntries elements.
> void vtkTimerLog::AllocateLog()
> {
>   if (vtkTimerLog::TimerLog != NULL)
>     {
>     delete [] vtkTimerLog::TimerLog;
>     }
>   vtkTimerLog::TimerLog = new vtkTimerLogEntry[vtkTimerLog::MaxEntries];
> }
> 
> As I see from the code the TimerLog is created but where is the delete?
> There is no delete in the destructor. Okay.. I tried to put something
> like
>   if (vtkTimerLog::TimerLog != NULL)
>     {
>     delete [] vtkTimerLog::TimerLog;
>     }
> in the destructor. But it was even more mess...
> 
> Any hints ?
> 
> greets  
>   Ingo
> 
> 
> ---
> Dr.-Ing. Ingo H. de Boer
> 
> Polytec GmbH
> Polytec-Platz 1-7, 76337 Waldbronn, Germany
> phone: ++49 7243 604 106
> fax  : ++49 7243 604 255
>  
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 


-- 
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/




More information about the vtkusers mailing list