summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Library.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-05-07 04:58:06 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-05-07 04:58:06 (GMT)
commit01b3b7bf479477c60f11dcbb101fcfd29becbdc1 (patch)
tree508729c465052bf56fb3ad4e752293bdba72aacf /c++/src/H5Library.cpp
parentc1e82e516fb6c8c7fe40be385ef09dd5502205f0 (diff)
downloadhdf5-01b3b7bf479477c60f11dcbb101fcfd29becbdc1.zip
hdf5-01b3b7bf479477c60f11dcbb101fcfd29becbdc1.tar.gz
hdf5-01b3b7bf479477c60f11dcbb101fcfd29becbdc1.tar.bz2
C++ API improvement
Description: - Added another argument, LinkCreatPropList& lcpl, to the CommonFG::createGroup() functions for the use of link creation property list. The new argument has a default value. Group createGroup(const char* name, size_t size_hint = 0, const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT) Group createGroup(const H5std_string& name, size_t size_hint = 0, const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT) - Removed memory leaks caused by accidentally invoking p_get_member_type (in H5CompType.cpp, user reported via email, maybe no jira issue) - Made H5Location::closeObjId static, so no object is needed to close an hdf5 id. - Added classes StrCreatPropList, LinkCreatPropList, AttrCreatPropList for the C property list classes H5P_STRING_CREATE, H5P_LINK_CREATE, and H5P_ATTRIBUTE_CREATE. Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5Library.cpp')
-rw-r--r--c++/src/H5Library.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index cedb74c..372fa14 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -25,6 +25,9 @@
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
#include "H5LaccProp.h"
+#include "H5StrcreatProp.h"
+#include "H5AcreatProp.h"
+#include "H5LcreatProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
@@ -188,6 +191,14 @@ 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(AttrCreatPropList::deleteConstants);
+ if (ret_value != 0)
+ throw LibraryIException("H5Library::initH5cpp", "Registrating AttrCreatPropList::deleteConstants failed");
+
ret_value = std::atexit(FileAccPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating FileAccPropList::deleteConstants failed");