summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataType.cpp
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-10-04 07:33:40 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-10-04 07:33:40 (GMT)
commit914643490ab581c4b0bb78ca30a8e1fa520b4d6d (patch)
tree53436d1611395e02c652c7ac5c075898fc2ae261 /c++/src/H5DataType.cpp
parent0ee053bb95a620b6f8109d22a372f6acc1cee300 (diff)
parent888a002cddaa4e1d9a165ea01dfe62f399df9eb9 (diff)
downloadhdf5-914643490ab581c4b0bb78ca30a8e1fa520b4d6d.zip
hdf5-914643490ab581c4b0bb78ca30a8e1fa520b4d6d.tar.gz
hdf5-914643490ab581c4b0bb78ca30a8e1fa520b4d6d.tar.bz2
[svn-r27946] Brought VDS branch in sync with trunk (up to r27945).
Tested on Ubuntu 15.04 (Linux 3.19 x86_64), gcc 4.9.2, MPICH 3.1.4 and CMake 3.3.2. - Autotools serial w/ Fortran, C++ - Autotools parallel w/ Fortran - CMake serial w/ Fortran, C++
Diffstat (limited to 'c++/src/H5DataType.cpp')
-rw-r--r--c++/src/H5DataType.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index cdcd1e6..02d3eda 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -760,23 +760,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;