Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue 8311][pulsar-client-go] Fix memory leak in cgo golang client (a…
…pache#8325) * [Issue 8311] Fixes memory leak in cgo golang client 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. 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. * The explicit free inside pulsarProducerSendCallbackProxyWithMsgID() is not required, because the getMessageId() call attaches a finalizer which will take care of things.
- Loading branch information