[Dcmlib] Re: ptotential memory leak without virtual destructor.

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Nov 16 18:28:19 CET 2004


Dennis wrote:
> Hi, Matheieu,
>  From my debugging and testing, i guess gdcm::Header creates TagHT.
>  
> But after i clean the TagHT, i can't delete PixelConvert, or else crash.
>  
>  From my debugging in gdcmFile.cxx, in the following codes:
>  
>  // Will be 7fe0, 0010 in standard case
>    GetHeader()->SetEntryBinAreaByNumber( pixelData,
>       GetHeader()->GetGrPixel(), GetHeader()->GetNumPixel()); 
>  
> this call bind the pixelData to the internalHeader and pixelData memory 
> will be managed by internalHeader,
> so we can't delete PixelConverter after internalHeader is cleaned. I 
> think it's some bizarre. why we do in this way?
> now i have comment out delete PixelConvert because internalHeader have 
> cleaned the data.
>  
> Hope you can have a better solution for this issue.

Dennis,

	Could you update your gdcm version and let us know is Benoit's patch 
solve your bug ?

Thanks
Mathieu
Ps: thanks for changing your email adress





More information about the Dcmlib mailing list