summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-03-15 14:12:49 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-03-15 14:12:49 (GMT)
commit7c6ed5cfcdd621a0982ed1b7c1aeb749b794fc2c (patch)
tree736cb441b010b593abb9835a7f3de6d1746c813e
parent7408b92fdcc8224d595716afe68add025d461124 (diff)
parent9e6ee84e6bb0194ad4f046c49ed7936dbab234db (diff)
downloadhdf5-7c6ed5cfcdd621a0982ed1b7c1aeb749b794fc2c.zip
hdf5-7c6ed5cfcdd621a0982ed1b7c1aeb749b794fc2c.tar.gz
hdf5-7c6ed5cfcdd621a0982ed1b7c1aeb749b794fc2c.tar.bz2
Merge pull request #961 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr_cpp3:develop to develop
* commit '9e6ee84e6bb0194ad4f046c49ed7936dbab234db': Fixed memory leak Description: Added LinkCreatPropList to initH5cpp to cleaning up resource at exit. Platforms tested: Linux/64 (jelly) Linux/ppc64 (ostrich)
-rw-r--r--c++/src/H5Library.cpp4
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");