diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-10-06 19:09:59 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-10-06 19:09:59 (GMT) |
commit | 8e9b142d9cd347432d400b4f9b3b88a3f047c06d (patch) | |
tree | 47f400406beacaac0a987619ee17a7f4ef0bb44d /c++/src/H5DataType.cpp | |
parent | 8d131aca15bca2d042ef175af5cf5a642d4c1152 (diff) | |
parent | 58db7babe40a10916a1c3b7667eaaeb5d48c2fb8 (diff) | |
download | hdf5-8e9b142d9cd347432d400b4f9b3b88a3f047c06d.zip hdf5-8e9b142d9cd347432d400b4f9b3b88a3f047c06d.tar.gz hdf5-8e9b142d9cd347432d400b4f9b3b88a3f047c06d.tar.bz2 |
[svn-r27976] merge from trunk.
Diffstat (limited to 'c++/src/H5DataType.cpp')
-rw-r--r-- | c++/src/H5DataType.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index cdcd1e6..88dff89 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -28,6 +28,7 @@ #include "H5Object.h" #include "H5FaccProp.h" #include "H5FcreatProp.h" +#include "H5OcreatProp.h" #include "H5DcreatProp.h" #include "H5DxferProp.h" #include "H5CommonFG.h" @@ -760,23 +761,17 @@ void DataType::close() // - Added the use of H5CPP_EXITED to terminate the HDF5 library // and elimiate previous memory leaks. See comments in the // header file "H5PredType.h" for details. - BMR, Mar 30, 2012 +// - Major re-implementation of the global constants was done +// to avoid relying on the order of the creation and deletion +// of the global constants. Hence, H5CPP_EXITED was removed. +// See Design Notes in "H5PredType.cpp" for details. +// - BMR, Sep 30, 2015 //-------------------------------------------------------------------------- DataType::~DataType() { try { - /* If this is the object AtExit, terminate the HDF5 library. This is - to eliminate memory leaks due to the library being re-initiated - (after the program has ended) and not re-terminated. */ - if (id == H5CPP_EXITED) - { - herr_t ret_value = H5close(); - if (ret_value == FAIL) - throw DataTypeIException(inMemFunc("~DataType - "), "H5close failed"); - } - // Close the HDF5 datatype - else - close(); + close(); } catch (Exception close_error) { cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl; |