Kitware / MetaIO

MetaImage is the text-based tagged file format for medical images that resulted. We have now extended that file format to support a variety of objects that occur in medicine such a tubes (for vessels, needles, etc.), blobs (for arbitrary shaped objects), cubes, spheres, etc. The complete library is known at MetaIO.

Home Page:http://www.itk.org/Wiki/ITK/MetaIO/Documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ITK MetaIO Valgrind defects

blowekamp opened this issue · comments

There are a large number of memory leaks detected on the ITK dashboard related to MetaIO. Here is a sample:

{
   
   Memcheck:Leak
   match-leak-kinds: definite
   fun:_Znwm
   fun:_ZN9MetaImageC1Ev
   fun:_ZN3itk11MetaImageIOC1Ev
   fun:_ZN3itk11MetaImageIO3NewEv
   fun:_ZN3itk20CreateObjectFunctionINS_11MetaImageIOEE12CreateObjectEv
   fun:_ZN3itk17ObjectFactoryBase15CreateAllObjectEPKc
   fun:_ZN3itk17ObjectFactoryBase17CreateAllInstanceEPKc
   fun:_ZN3itk14ImageIOFactory13CreateImageIOEPKcNS_11CommonEnums10IOFileModeE
   fun:_ZN3itk15ImageFileReaderINS_5ImageIhLj2EEENS_25DefaultConvertPixelTraitsIhEEE25GenerateOutputInformationEv
   fun:_ZN3itk13ProcessObject23UpdateOutputInformationEv
   fun:_ZN3itk9ImageBaseILj2EE23UpdateOutputInformationEv
   fun:_ZN3itk10DataObject6UpdateEv
   fun:_ZN3itk13ProcessObject6UpdateEv
   fun:_Z35itkIsolatedWatershedImageFilterTestiPPc
   fun:main
}
{
   
   Memcheck:Leak
   match-leak-kinds: definite
   fun:_Znwm
   fun:_ZN9MetaImageC1Ev
   fun:_ZN3itk11MetaImageIOC1Ev
   fun:_ZN3itk11MetaImageIO3NewEv
   fun:_ZN3itk20CreateObjectFunctionINS_11MetaImageIOEE12CreateObjectEv
   fun:_ZN3itk17ObjectFactoryBase15CreateAllObjectEPKc
   fun:_ZN3itk17ObjectFactoryBase17CreateAllInstanceEPKc
   fun:_ZN3itk14ImageIOFactory13CreateImageIOEPKcNS_11CommonEnums10IOFileModeE
   fun:_ZN3itk15ImageFileWriterINS_5ImageIhLj2EEEE5WriteEv
   fun:_ZN3itk15ImageFileWriterINS_5ImageIhLj2EEEE6UpdateEv
   fun:_Z35itkIsolatedWatershedImageFilterTestiPPc
   fun:main
}
{
   
   Memcheck:Leak
   match-leak-kinds: definite
   fun:_Znwm
   fun:_ZN9MetaImageC1Ev
   fun:_ZN3itk11MetaImageIOC1Ev
   fun:_ZN3itk11MetaImageIO3NewEv
   fun:_ZN3itk20CreateObjectFunctionINS_11MetaImageIOEE12CreateObjectEv
   fun:_ZN3itk17ObjectFactoryBase15CreateAllObjectEPKc
   fun:_ZN3itk17ObjectFactoryBase17CreateAllInstanceEPKc
   fun:_ZN3itk14ImageIOFactory13CreateImageIOEPKcNS_11CommonEnums10IOFileModeE
   fun:_Z13HashTestImagePKcRKSt6vectorISsSaISsEE
   fun:main
}
{
   
   Memcheck:Leak
   match-leak-kinds: definite
   fun:_Znwm
   fun:_ZN9MetaImageC1Ev
   fun:_ZN3itk11MetaImageIOC1Ev
   fun:_ZN3itk11MetaImageIO3NewEv
   fun:_ZN3itk20CreateObjectFunctionINS_11MetaImageIOEE12CreateObjectEv
   fun:_ZN3itk17ObjectFactoryBase15CreateAllObjectEPKc
   fun:_ZN3itk17ObjectFactoryBase17CreateAllInstanceEPKc
   fun:_ZN3itk14ImageIOFactory13CreateImageIOEPKcNS_11CommonEnums10IOFileModeE
   fun:_ZN3itk15ImageFileReaderINS_11VectorImageIhLj6EEENS_25DefaultConvertPixelTraitsIhEEE25GenerateOutputInformationEv
   fun:_ZN3itk13ProcessObject23UpdateOutputInformationEv
   fun:_ZN3itk13ProcessObject27UpdateLargestPossibleRegionEv
   fun:_Z11ComputeHashIN3itk11VectorImageIhLj6EEEESsPKc
   fun:_Z13HashTestImagePKcRKSt6vectorISsSaISsEE
   fun:main
}

@hjmjohnson I know you have made a lot of great improvements. It looks like there at least one memory leak with the MetaImage class... I believe originating in the constructor.