[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)
This commit is contained in:
@@ -429,7 +429,7 @@ void DataSet::read( void* buf, const DataType& mem_type, const DataSpace& mem_sp
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::read
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c std::string for the buffer.
|
||||
/// It takes a reference to a \c H5std_string for the buffer.
|
||||
///\param buf - IN: Buffer for read data
|
||||
///\param mem_type - IN: Memory datatype
|
||||
///\param mem_space - IN: Memory dataspace
|
||||
@@ -505,7 +505,7 @@ void DataSet::write( const void* buf, const DataType& mem_type, const DataSpace&
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::write
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c std::string for the buffer.
|
||||
/// It takes a reference to a \c H5std_string for the buffer.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Jul 2009
|
||||
@@ -589,7 +589,7 @@ int DataSet::iterateElems( void* buf, const DataType& type, const DataSpace& spa
|
||||
/// For more information, please see the Description section in
|
||||
/// C layer Reference Manual at:
|
||||
///\par
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5D.html#Dataset-Extend
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html#Dataset-Extend
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::extend( const hsize_t* size ) const
|
||||
@@ -649,14 +649,14 @@ void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
|
||||
// Function: DataSet::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
|
||||
///\param ref - IN: Reference to query
|
||||
///\return An object type, which can be one of the following:
|
||||
/// \li \c H5G_LINK (0) \tObject is a symbolic link.
|
||||
/// \li \c H5G_GROUP (1) \tObject is a group.
|
||||
/// \li \c H5G_DATASET (2) \tObject is a dataset.
|
||||
/// \li \c H5G_TYPE Object (3) \tis a named datatype
|
||||
/// \li \c H5G_LINK (0) - Object is a symbolic link.
|
||||
/// \li \c H5G_GROUP (1) - Object is a group.
|
||||
/// \li \c H5G_DATASET (2) - Object is a dataset.
|
||||
/// \li \c H5G_TYPE (3) - Object is a named datatype
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -674,9 +674,9 @@ H5G_obj_t DataSet::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
/// to H5R_DATASET_REGION
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\return DataSpace instance
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
@@ -694,7 +694,7 @@ DataSpace DataSet::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
///\brief Get the id of this dataset.
|
||||
// Description:
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDs and Attribute are moved out of H5Object. In
|
||||
@@ -776,7 +776,7 @@ void DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_setId (private)
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
///\brief Sets the identifier of this dataset to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
|
||||
Reference in New Issue
Block a user