At 12:13 AM 5/13/98 -0500, Stanley Allen wrote:
>The single global reference count is to keep
>track of "database interface" objects.  There is
>a single count because there is one database, in
>shared memory.  The shared memory is allocated
>via OS calls when the ref count > 0, deallocated
>when the ref count = 0.

   Not the Ada way. ;-)  Seriously, if you do need to keep track of the
users of some global object, the best way is to use some sort of a list.
This way you don't have to worry about the (hopefully very rare) cases
where an object gets Finalized twice, or Finalized without complete
Initialization.  There are list structures where removing an item from a
list is atomic, and adding to and deleting from the list, and checking for
zero length are all O(1) operations.

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...