diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-03-15 14:06:16 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-03-15 14:06:16 (GMT) |
commit | 8f5be458f4284f763ef30c5bf665740d69c5ec16 (patch) | |
tree | e6a6a8c2e2e74215ee92202266f3d23bb1970231 /c++/src | |
parent | 19d54162ce7e43f04572b7cea12695df11ba7bea (diff) | |
download | hdf5-8f5be458f4284f763ef30c5bf665740d69c5ec16.zip hdf5-8f5be458f4284f763ef30c5bf665740d69c5ec16.tar.gz hdf5-8f5be458f4284f763ef30c5bf665740d69c5ec16.tar.bz2 |
Fixed memory leak
Description:
Added LinkCreatPropList to initH5cpp to cleaning up resource at exit.
Platforms tested:
Linux/64 (jelly)
Linux/ppc64 (ostrich)
Diffstat (limited to 'c++/src')
-rw-r--r-- | c++/src/H5Library.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index 55f82f5..2cbdfba 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -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"); |