bschofield opened a new pull request #8325:
URL: https://github.com/apache/pulsar/pull/8325


   Fixes #8311.
   
   ### Motivation
   
   In the C/C++ glue code, file *c_Producer.cc* function 
*handle_producer_send()*, a new `pulsar_message_id_t` is created. This needs to 
be freed at some point.
   
   Because of issues with legacy C clients, it is not possible to call *delete* 
from inside `c_Producer.cc` (see commentary on #8311). Instead, the client must 
call *pulsar_message_id_free()*.
   
   Previously, the cgo interface was not freeing this message ID, which caused 
a memory leak on every message sent.
   
   ### Modifications
   
   This PR adds the missing calls to *pulsar_message_id_free()*. The calls are 
added in the cgo layer, in *pulsarProducerSendCallbackProxy()* and 
*pulsarProducerSendCallbackProxyWithMsgID()*.
   
   ### Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API: no
     - The schema: no
     - The default values of configurations: no
     - The wire protocol: no
     - The rest endpoints: no
     - The admin cli options: no
     - Anything that affects deployment: no
   
   ### Documentation
   
     - Does this pull request introduce a new feature? no
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to