BewareMyPower commented on PR #16256: URL: https://github.com/apache/pulsar/pull/16256#issuecomment-1168201122
The best practice might be adding an `initialize()` method to a recyclable class and calling this method at the beginning of each factory method, like: ```java private void initialize() { x = 100; } public static RecyclableInteger create() { final RecyclableInteger i = RECYCLER.get(); i.initialize(); return i; } ``` -- 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