tibrvMsg_Detach()

Function

Declaration

tibrv_status tibrvMsg_Detach(
    tibrvMsg        message);

Purpose

Detach an inbound message from Rendezvous storage; the program assumes responsibility for destroying the message.

Remarks

When Rendezvous software creates a message, it owns that message. This situation occurs only in the case of inbound messages presented to a data callback function; Rendezvous software destroys such messages when the callback function returns, unless the program explicitly detaches the message. After a detach operation, the program owns the message, and must explicitly destroy it to reclaim the storage.

Programs can use this function to detach either an entire message, or a submessage. After detaching a submessage, the program owns that submessage, even after the destruction of the surrounding parent message.

Warning 

Programs may modify messages only with functions that add, remove or update fields. It is illegal to directly modify data storage in a message field. Detaching a message does not change this restriction. For further information, see Do Not Modify Pointer Snapshots, or more generally, Validity of Data Extracted From Messages.

Parameter

Description

message

Detach this message.

See Also

tibrvMsg_Destroy()

tibrvEventCallback

tibrvcmEventCallback