If I use "tibrvMsg_GetReplySubject" in a loop, the memory usage of my program continously grows.Is there a known memory leak associated with using this RV API?
book
Article ID: KB0085869
calendar_today
Updated On:
Products
Versions
TIBCO Rendezvous
-
Not Applicable
-
Description
Resolution: This is the expected behaviour. Every time the function tibrvMsg_GetReplySubject is called, we create a copy of the reply subject and manage it until the end of the message's lifetime. The user should never free the returned memory but should be aware that if the function is repeatedly called on a single message, memory usage would grow until that message is destroyed.
This code is showing the memory growth problem:
void check(tibrv_status status) { if (status != TIBRV_OK) abort(); }
for (;;) { char const * s; check(tibrvMsg_GetReplySubject(msg, &s)); }
return 0; }
If a user really needs to access the reply subject of a single message repeatedly, the APIs tibrvMsg_MarkReferences and tibrvMsg_ClearReferences can be used to manage the memory usage.
Issue/Introduction
If I use "tibrvMsg_GetReplySubject" in a loop, the memory usage of my program continously grows.Is there a known memory leak associated with using this RV API?