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.