[Insight-developers] Memory leaks after reading some dicom files

Massimo Esposito mass.esposito at gmail.com
Fri Mar 23 08:16:51 EST 2007


I used the sofware GlowCode to detect memory leaks and this is the report it
generated.
In attach there is this report.
I execute my application in debug mode using Visual Studio .Net 2003. So
when i close the application the memory leaks are printed and iI have a
report like the one obtained using GlowCode .
I hope the file attached can be useful to you.
Max

2007/3/23, Massimo Esposito <mass.esposito at gmail.com>:
>
> My code is part of an MFC SDI application. So i think you cn't use
> valgrind to track memory leaks. Besides i note there are no memory leaks if
> i run the example that read and write Dicom series but i detect memory leaks
> if i copy the same code and insert it in a function of my MFC application.
> The same application didn't have any problems with itk 2.4.
> The dicom series that cause memory leaks contain private data and for this
> reason i must verify if i can share it.
> Anyway, do you know a tool like valgrind for windows and mfc application?
> I can try to identify the point in the code where the memory leaks happen
> and then communicate it to you.
> What do you think about it?
> Thanks a lot.
> Max
>
>
> 2007/3/21, kent williams <norman-k-williams at uiowa.edu>:
> >
> > If you can send me a link to one of the image series that is causing the
> > memory leaks I can run it under valgrind and try and see what's leaking.
> >
> > How are you diagnosing the memory leaks? Any idea where in the code
> > they're happening?
> >
> >
> > On 3/21/07 4:07 PM, "Massimo Esposito" < mass.esposito at gmail.com> wrote:
> >
> >  Hi list,
> > i have a problem. My application reads dicom files but when i close it i
> > detect memory leaks .
> > I used itk 2.4 and i didn't have this problem. Now i ported my code to
> > itk 3.0 or itk 3.2 and i detected this strange behaviour.
> > But it happens only with some series, that is,  sometimes, after having
> > opened some dicom files, i can close my application correctly, sometimes
> > memory leaks are generated (i noted to have problems with file without
> > extensions, but maybe it is casual).
> > I tried to read these dicom files that generated memory leaks and then
> > to write them using GDCM embedded in itk. If i read this files written with
> > GDCM no memory leaks are generated.
> > Besides, if i try to use itk::DicomImageIO2 instead of itk::GDCMImageIO
> >  no memory leaks are generated in any cases, but using itk::DicomImageIO2 i
> > can't read all the header dicom's tags.
> > Instead, using  itk::GDCMImageIO, i do it. Moreover,  if i call the
> > updateoutputinformation member instead of update one of the reader,  the
> > number of memory leaks is lower but still present.
> > So i think there are some problems about reading the dicom header.
> > My code worked fine with itk 2.4!!
> > Can someone help me?
> > Thanks a lot,
> > Max
> >
> > ------------------------------
> > _______________________________________________
> > Insight-developers mailing list
> > Insight-developers at itk.org
> > http://www.itk.org/mailman/listinfo/insight-developers
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20070323/300fbc77/attachment.html


More information about the Insight-developers mailing list