aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOHDF5/src/iohdf5.cc
diff options
context:
space:
mode:
authorschnetter <>2004-03-03 12:07:00 +0000
committerschnetter <>2004-03-03 12:07:00 +0000
commitf38765a98c778f81f436f6e066bf2e2c9fe0cc72 (patch)
tree4af19aff03e5731982ce3d1147b74fa3954b185d /Carpet/CarpetIOHDF5/src/iohdf5.cc
parentc337c4f7839d1fb7b97224feae1ba73025f6d145 (diff)
Close data types, data spaces, and attributes when they are not needed
Close data types, data spaces, and attributes when they are not needed any more. darcs-hash:20040303120701-07bb3-bc92d93953009d8e0c22abbde6c188f7ae21e620.gz
Diffstat (limited to 'Carpet/CarpetIOHDF5/src/iohdf5.cc')
-rw-r--r--Carpet/CarpetIOHDF5/src/iohdf5.cc29
1 files changed, 28 insertions, 1 deletions
diff --git a/Carpet/CarpetIOHDF5/src/iohdf5.cc b/Carpet/CarpetIOHDF5/src/iohdf5.cc
index 500e9a0df..70429b1df 100644
--- a/Carpet/CarpetIOHDF5/src/iohdf5.cc
+++ b/Carpet/CarpetIOHDF5/src/iohdf5.cc
@@ -17,7 +17,7 @@
#include "cctk_Parameters.h"
extern "C" {
- static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOHDF5/src/iohdf5.cc,v 1.1 2004/03/03 09:44:26 schnetter Exp $";
+ static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOHDF5/src/iohdf5.cc,v 1.2 2004/03/03 13:07:01 schnetter Exp $";
CCTK_FILEVERSION(Carpet_CarpetIOHDF5_iohdf5_cc);
}
@@ -1051,6 +1051,12 @@ namespace CarpetIOHDF5 {
values[i] = values1[i];
}
+ herr = H5Tclose (datatype);
+ assert (!herr);
+
+ herr = H5Sclose (dataspace);
+ assert (!herr);
+
herr = H5Aclose (attribute);
assert (!herr);
@@ -1104,6 +1110,12 @@ namespace CarpetIOHDF5 {
values[i] = values1[i];
}
+ herr = H5Tclose (datatype);
+ assert (!herr);
+
+ herr = H5Sclose (dataspace);
+ assert (!herr);
+
herr = H5Aclose (attribute);
assert (!herr);
@@ -1146,6 +1158,15 @@ namespace CarpetIOHDF5 {
assert (!herr);
values[length] = '\0';
+ herr = H5Tclose (datatype);
+ assert (!herr);
+
+ herr = H5Sclose (dataspace);
+ assert (!herr);
+
+ herr = H5Aclose (attribute);
+ assert (!herr);
+
return length;
}
@@ -1182,6 +1203,12 @@ namespace CarpetIOHDF5 {
values[i] = values1[i];
}
+ herr = H5Tclose (datatype);
+ assert (!herr);
+
+ herr = H5Sclose (dataspace);
+ assert (!herr);
+
herr = H5Aclose (attribute);
assert (!herr);