[Back to Interface] [Prev] [Next]

Hendaccess

intn Hendaccess(int32 h_id)

h_id IN:

Access identifier returned by Hstartread, Hstartwrite, or Hnextread

Purpose

Terminates access to a data object by disposing of the access identifier.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

The number of active access identifiers is limited to MAX_ACC as defined in the hlimits.h header file. Because of this restriction, it is very important to call Hendaccess immediately following the last operation on a data element.

When developing new interfaces, a common mistake is to omit calling Hendaccess for all of the elements accessed. When this happens, Hclose will return FAIL, and a dump of the error stack will report the number of active access identifiers. Refer to the Reference Manual page on HEprint.

This is a difficult problem to debug because the low levels of the HDF library cannot determine who and where an access identifier was originated. As a result, there is no automated method of determining which access identifiers have yet to be released.



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.