tibrvMsg_Destroy()

Function

Declaration

tibrv_status tibrvMsg_Destroy(
    tibrvMsg        message);

Purpose

Destroy a message; free the storage that it occupies.

Remarks

A program owns all messages that it creates or detaches, and must destroy them to reclaim the storage. That is, each call to tibrvMsg_Create() or tibrvMsg_Detach() must be paired with a call to this function.

This function frees the storage associated with the message and its snapshot data. In most operating environments it is illegal to access freed storage.

Destroying a message invalidates all pointer data (such as strings, arrays, undetached submessages, byte sequences, or XML data) previously extracted from any fields of the message.

However, destroying a parent message does not affect detached submessages of the parent.

It is safe for a program to exit without first destroying all messages.

Do Not Destroy Messages that Rendezvous Software Owns

Warning 

Rendezvous software owns all inbound messages (unless explicitly detached). It automatically destroys its messages as the program exits the context of the callback function. It is illegal for your program to destroy a message that it does not own.

Parameter

Description

message

Destroy this message, freeing its storage.

See Also

tibrvMsg_Create()

tibrvMsg_Detach()

tibrvEventCallback