Last modified: 15 June 2009
Name: H5Iget_ref
Signature:
  int `H5Iget_ref`( hid_t `obj_id` )

Purpose:
  Retrieves the reference count for an object.

Description:
  `H5Iget_ref` retrieves the reference count of the object identified by `obj_id`.

  The reference count for an object identifier is attached to the information about an object in memory and has no relation to the number of links to an object on disk.

  The function `H5Iis_valid` is used to determine whether a specific object identifier is valid.

Parameters:

  hid_t `obj_id` | IN: Object identifier whose reference count will be retrieved.

Returns:
  Returns a non-negative current reference count of the object identifier if successful; otherwise a negative value is returned.

See Also:
  - `H5Iis_valid`
  - `H5Iget_type`

Fortran90 Interface: h5iget_ref_f

      SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: obj_id  !Object identifier
        INTEGER, INTENT(OUT) :: ref_count     !Reference count of object identifier
        INTEGER, INTENT(OUT) :: hdferr        ! Error code
                                              ! 0 on success, and -1 on failure
      END SUBROUTINE h5iget_ref_f

History:

Release | C
1.6.2 | Function introduced in this release. Fortran subroutine introduced in this release.