Fixed memory leak

Description:
    Added LinkCreatPropList to initH5cpp to cleaning up resource at exit.
Platforms tested:
    Linux/64 (jelly)
    Linux/ppc64 (ostrich)
This commit is contained in:
Binh-Minh Ribler 2018-03-15 09:06:16 -05:00
parent 19d54162ce
commit 8f5be458f4

View File

@ -188,6 +188,10 @@ void H5Library::initH5cpp()
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating LinkAccPropList::deleteConstants failed");
ret_value = std::atexit(LinkCreatPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating LinkCreatPropList::deleteConstants failed");
ret_value = std::atexit(FileAccPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating FileAccPropList::deleteConstants failed");