Can the “tibemsMsg” data structure in TIBCO Enterprise Message Server C API be reused in a while loop without tibemsMsg_Destroy?

Can the “tibemsMsg” data structure in TIBCO Enterprise Message Server C API be reused in a while loop without tibemsMsg_Destroy?

book

Article ID: KB0088887

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Resolution:
Description:
==========
Can the “tibemsMsg” data structure in TIBCO Enterprise Message Server C API be reused in a while loop without calling tibemsMsg_Destroy?

Environment:
==========
ALL

Resolution:
=========
For a message consumer,  if you receive messages in a for loop, you must call tibemsMsg_Destroy to destroy the tibemsMsg message object in each loop, otherwise, the allocated memory which is referenced by the pointer returned by consumer receive will be leaked.

For a message sender, if you send messages in a for loop, the tibemsMsg message object can be reused and then be destroyed after finishing the while loop.

Issue/Introduction

Can the “tibemsMsg” data structure in TIBCO Enterprise Message Server C API be reused in a while loop without tibemsMsg_Destroy?