If I call h5gopen, and it fails, do i still need to call h5gclose after to release memory?? #3627
-
If the return error is that of a failure from h5gopen, do I still need to call h5gclose afterwards to release potential memory allocations?? And the same question for h5[*]open (such as for opening properties, attributes, etc.). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @jjepson2, For any object (file, group, dataset, attribute, etc.) that you attempt to open, However, if you find that memory is still allocated after an H5Xopen call fails, |
Beta Was this translation helpful? Give feedback.
Hi @jjepson2,
For any object (file, group, dataset, attribute, etc.) that you attempt to open,
if the H5Xopen (H5Fopen, H5Dopen, etc.) call fails, then you do NOT need to
call H5Xclose to release any potential memory allocations; the library should
do this and return H5I_INVALID_HID from the H5Xopen call. Attempting to call
H5Xclose on that returned ID value will cause an error from HDF5.
However, if you find that memory is still allocated after an H5Xopen call fails,
please let us know so that we can investigate.