BewareMyPower commented on PR #230: URL: https://github.com/apache/pulsar-client-cpp/pull/230#issuecomment-1509049662
After thinking for a while, I think the APIs should also be considered carefully. And we should fix the memory leak. So I opened another PR (https://github.com/apache/pulsar-client-cpp/pull/252) for that. In my PR, the main differences are: - For `pulsar_messages_t`, only support read-only operations (`get(i)` and `size()`). We should not expose methods that could modify it. - The `pulsar_message_t*` returned by `pulsar_messages_get` should not be freed. It should just be a const reference to a message for users to view the content. Allocating a `pulsar_message_t` for it brings unnecessary overhead. - More detailed API docs to tell users how to use these C APIs. - The memory leak is fixed. Let's move to my PR for further discussion. -- 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. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org