H5Oincr_refcountincrements the hard link reference count for an object. It should be used any time a user-defined link that references an object by address is added. When the link is deleted,H5Odecr_refcountshould be used.
An object’sreference countis the number of hard links in the file that point to that object. See the “Programming Model” section of the “HDF5 Groups” chapter in theHDF5 User’s Guidefor a more complete discussion of reference counts.
If a user application needs to determine an object’s reference count, anH5Oget_infocall is required; the reference count is returned in thercfield of theH5O_info_tstruct.
Warning: This function must be used with care! Improper use can lead to inaccessible data, wasted space in the file, or file corruption.
Returns a non-negative value if successful; otherwise returns a negative value.