helenginn / cppxfel

cppxfel source - I finished my doctorate. This program is FOSSILISED! Assume no more support!!
3 stars 2 forks source link

Close HDF5 handles for groups and datasets #26

Closed biochem-fan closed 8 years ago

biochem-fan commented 8 years ago

When we H5Gopen and H5Dopen, we should close them.

biochem-fan commented 8 years ago

We also have to release type and space handles after H5Dget_type and H5Dget_space.

A dataspace identifier returned from this function should be released with H5Sclose when the identifier is no longer needed so that resource leaks will not occur.

https://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html#Dataset-GetSpace

A datatype identifier returned from this function should be released with H5Tclose when the identifier is no longer needed so that resource leaks will not occur.

https://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html#Dataset-GetType

helenginn commented 8 years ago

I have released the type and space handles as well in commit d0946425c74d8b5bdf76319d94258fa9857c363c