merlimat commented on a change in pull request #561: Fix: CPP release 
baseCommand after serializing it
URL: https://github.com/apache/incubator-pulsar/pull/561#discussion_r127104224
 
 

 ##########
 File path: pulsar-client-cpp/lib/Commands.cc
 ##########
 @@ -137,6 +141,7 @@ PairSharedBuffer Commands::newSend(SharedBuffer& headers, 
BaseCommand& cmd,
         headers.setWriterIndex(writeIndex);
     }
 
+    cmd.release_send();
 
 Review comment:
   Ok, here it's not allocating a new object each time. 
   In any case, instead of releasing it (which means, it would need to allocate 
one for each message published), we should clear the protobuf object. So that 
it gets reset to default values, without destroying the internal objects (they 
are just cached). 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to