H5G_UNLINK removes the object specified by
name from the group graph and decrements the link count for the object to which
name points. This action eliminates any association between
name and the object to which
Object headers keep track of how many hard links refer to an object; when the link count reaches zero, the object can be removed from the file. Objects which are open are not removed until all identifiers to the object are closed.
If the link count reaches zero, all file space associated with the object will be released, i.e., identified in memory as freespace. If any object identifier is open for the object, the space will not be released until after the object identifier is closed.
Note that space identified as freespace is available for re-use only as long as the file remains open; once a file has been closed, the HDF5 library loses track of freespace. See “Freespace Management” in the HDF5 User's Guide for further details.
Exercise care in unlinking groups as it is possible to render data in a file inaccessible with H5G_UNLINK. See The Group Interface in the HDF5 User's Guide.