InterViews Reference Manual -- Resource
NAME
Resource - InterViews shared object
SYNOPSIS
#include <InterViews/resource.h>
DESCRIPTION
Resource is a class that provides a simple form of reference
counting for shared objects. Every resource has a reference count that is
initially set to zero and must be explicitly incremented through a call to
Reference. A resource should not be deleted like other objects; instead, the
global function Unref should be used to unreference the object. When a
resource is unreferenced, the reference count is decremented and if it becomes
zero the object is destroyed.
PUBLIC OPERATIONS
Resource()
Create a new resource object with its reference count set to zero.
void Reference()
Increment the resource's reference count.
FRIEND OPERATIONS
void Unref(Resource*)
If the resource pointer is non-nil, decrement its reference count and destroy
the object if the reference count is now zero. Unref is a global function, not
a Resource member function, because it must check if the target pointer is nil.
Next: Rubband
| Prev: ReqErr
| Up: index
| Top: index