next up previous contents
Next: Counting xPops Up: Reference counts Previous: Reference counts

Counting External References

 

Several of the UPI functions are involved in maintaining the count of permanent external references. They are listed here along with their semantics with respect to reference counts.

The newly created session has an initial reference count of 0.

The session returned by invoking the lower protocol's open routine has its reference count incremented before it is returned to the caller of xOpen, indicating that the caller now has a permanent reference to the session.

Decrements the reference count of the session, indicating that a permanent reference to the session has been released. The lower protocol's close operation is called only if the session's new reference count is zero.

By default, increments the session's reference count, indicating that a new permanent reference to the session has been created. If the session has its own duplicate function, that is called instead.


Larry Peterson
Wed Feb 21 13:58:06 MST 1996