NAME

cxDataRefDec - decrement reference count of IRIS Explorer data type
#include <cx/DataOps.h>

void cxDataRefDec(void *data)
subroutine cxDataRefDec(data)
integer data
data
Pointer to any reference counted IRIS Explorer data type.
cxDataRefDec decrements the reference count of the IRIS Explorer data type pointed to by data. If the reference count becomes 0 or -1, the data's type-specific deletion routine is called. (All type-specific deletion routines are hidden from the user, because they must only be called when the reference count is less than 1.)

If, when data is deleted, it contains references to other IRIS Explorer data types (for instance, a cxLattice may contain pointers to a cxData or cxCoord), the reference counts of the data it contains are also decremented. The contained data is not deleted directly, this allows one cxData to be shared by multiple instances of cxLattice.

A module does not normally need to call cxDataRefDec. The reference counts of the data present on input or output ports are managed automatically when the module sends or receives data. If the module creates a temporary IRIS Explorer data type that is not output to another module, it must call cxDataRefDec to delete the data.

See Appendix B of the IRIS Explorer Module Writer's Guide for more information on reference counting.

cxDataRefInc(3E)
Last modified: Mon Nov 6 16:33:06 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996