ivankelly commented on issue #1233: Reduce running time for testLedgerCreateAdvWithLedgerIdInLoop URL: https://github.com/apache/bookkeeper/pull/1233#issuecomment-371440454 @reddycharan I guess I comes down to a question of whether you expect the API to take ownership of a passed in ByteBuf or not. i.e. if I create a bytebuf and pass it in, do I expect the API to clean it up. In our APIs we do make this assumption. I kinda prefer it this way, as then you should be able to forget about the bytebuf once passed in, but this isn't a strong preference. This is documented in the apidocs, though it's not very loud. We should probably have a full non-javadoc page of documentation dedicated to our ByteBuf usage. Anyhow, the retain in question is there because I want to keep those ByteBufs alive beyond the lifetime of the write call so they can be compared later. I neglected to release them out of laziness. Added the release now.
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services