next up previous
Next: Promoting and Demoting Locators
Up: USING LOCATORS
Previous: Primary and Secondary Locators

Container File Reference Counts   

The number of primary locators associated with an HDS container file is called its reference count and may be determined using the DAT_REFCT routine as follows:

      CALL DAT_REFCT( LOC, REFCT, STATUS )

Here, LOC is a locator associated with any object in the file and the reference count is returned via the integer REFCT argument. The file will remain open for as long as this value is greater than zero.

Normally, a file's reference count will fall to zero due to annulling the last primary locator associated with it (usually the locator obtained when the file was originally opened), and at this point the file will be closed. Before this happens, however, any mapped primitive objects within it will be unmapped. In addition, any secondary locators that remain associated with data objects in the same file will be annulled (i.e. they will become invalid).[*] No further reference to objects within the file may be made until it has been explicitly re-opened.



next up previous
Next: Promoting and Demoting Locators
Up: USING LOCATORS
Previous: Primary and Secondary Locators

HDS Hierarchical Data System
Starlink User Note 92
R.F. Warren-Smith & M.D. Lawden
23rd February 1999
E-mail:rfws@star.rl.ac.uk

Copyright (C) 1999 Central Laboratory of the Research Councils