[DISCUSS] PIP-244: Refactor ByteBuf release method Hello everyone. I hope you guys are all doing well. I would like to start the discussion for PIP-244 https://github.com/apache/pulsar/issues/19350, Please let me know if you have any concerns or questions. ------- Paste original PIP content to help quote ------
### Motivation It may throw an exception when release a `ByteBuf` object. so the exception in `ByteBuf.release` should be checked. ### Goal Use `ReferenceCountUtil.safeRelease()` instead of `ByteBuf.release()` in all Pulsar's classes. ### API Changes _No response_ ### Implementation 1. Use `ReferenceCountUtil.safeRelease()` instead of `ByteBuf.release()`.