There are some things you can do to help resolve the issue:
- Use H5P_SET_FCLOSE_DEGREE to do a strong close of a file. See the example program h5close.c.
- Call H5_CLOSE to close everything.
- Call H5F_GET_OBJ_COUNT to get the number of open file object identifiers, and then call H5F_GET_OBJ_IDS to get the list of open object identifiers. See the example program: h5ckopen.c
Note that these routines do not work with secondary objects such as dataspaces, property lists, and datatypes.