BewareMyPower commented on code in PR #332:
URL: https://github.com/apache/pulsar-client-cpp/pull/332#discussion_r1366708418


##########
lib/MessageImpl.h:
##########
@@ -47,6 +47,7 @@ class MessageImpl {
     int redeliveryCount_;
     bool hasSchemaVersion_;
     const std::string* schemaVersion_;
+    std::shared_ptr<class ConsumerImpl> consumerPtr_;

Review Comment:
   Should you store a `std::weak_ptr`? If we have N `Message` objects, the 
reference count of the `ConsumerImpl` will be at least `N + 1`, which is 
unnecessary and it might extend the lifetime of internal consumers unexpectedly.



-- 
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

Reply via email to