Reference Count


Type:
Two-byte integer of C type T_INT2
Default Value:
1
Valid Values:
Any integer greater than 0

The reference count property identifies the number of independent references to a message. This property can be used to prevent a message from being destroyed while it is still in use. This is useful when using functions that destroy a message (see Destroying a Message). Incrementing the reference count of a message is faster and uses less memory than making a complete copy of the message with TipcMsgClone.

Function to set value:

TipcMsgIncrRefCount increments the message reference count. TipcMsgDestroy decrements the message reference count and destroys the message if the reference count drops to zero. For example:

if (!TipcMsgIncrRefCount(msg)) { 
  /* error */ 
} 
Function to get value:

TipcMsgGetRefCount. For example:

if (!TipcMsgGetRefCount(msg, &ref_count)) { 
  /* error */ 
} 

TIBCO SmartSockets™ User’s Guide
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com