diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2012-04-02 03:14:19 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2012-04-02 03:14:19 (GMT) |
commit | 88ce565d7d324569f2a360aa37bfeefffa021a8a (patch) | |
tree | 94e9dc7c38bb49e7c70c42f6c3fcca73eacfd545 /c++/src/H5Attribute.cpp | |
parent | 42306f8ed4ade51a8629b9c5a159d1afac5f617f (diff) | |
download | hdf5-88ce565d7d324569f2a360aa37bfeefffa021a8a.zip hdf5-88ce565d7d324569f2a360aa37bfeefffa021a8a.tar.gz hdf5-88ce565d7d324569f2a360aa37bfeefffa021a8a.tar.bz2 |
[svn-r22235] Purpose: Fixed bugs HDFFV-2761 & HDFFV-7852
Description:
- Replaced PredType::NotAtexit() with PredType::AtExit(H5CPP_EXITED);
and used PredType::AtExit as a flag to detect when all predefined
types have been destroyed. Then, H5close will be called to terminate
the library after its being re-initiated when the PredType destructors
were activated. This change removed the memory leaks shown by the
user's sample program.
- Added H5CPP_EXITED for PredType::AtExit to use as a flag
- Updated some inaccurate comments
- Removed stream functions from FileAccPropList
- Replaced H5_VMS with appropriate macro in H5IdComponent.cpp
- Corrected many URLs (hdfgroup vs. ncsa) in comments
- Replaced std::string with H5std_string in comments
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 2.6 (amani)
SunOS 5.10 (linew)
Diffstat (limited to 'c++/src/H5Attribute.cpp')
-rw-r--r-- | c++/src/H5Attribute.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index 84826c4..226ae5c 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -223,11 +223,11 @@ size_t Attribute::getInMemDataSize() const // Close the native type and the datatype of this attribute. if (H5Tclose(native_type) < 0) { - throw DataSetIException(func, "H5Tclose(native_type) failed"); + throw DataSetIException(func, "H5Tclose(native_type) failed"); } if (H5Tclose(mem_type_id) < 0) { - throw DataSetIException(func, "H5Tclose(mem_type_id) failed"); + throw DataSetIException(func, "H5Tclose(mem_type_id) failed"); } // Get number of elements of the attribute by first getting its dataspace @@ -246,7 +246,7 @@ size_t Attribute::getInMemDataSize() const // Close the dataspace if (H5Sclose(space_id) < 0) { - throw DataSetIException(func, "H5Sclose failed"); + throw DataSetIException(func, "H5Sclose failed"); } // Calculate and return the size of the data @@ -469,7 +469,6 @@ void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) c //-------------------------------------------------------------------------- void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg) const { - // Prepare and call C API to read attribute. char *strg_C; |