dao-jun commented on code in PR #23833:
URL: https://github.com/apache/pulsar/pull/23833#discussion_r1909814760


##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/collections/BitSetRecyclable.java:
##########
@@ -1211,6 +1211,9 @@ public void recycle() {
         if (recyclerHandle != null) {
             this.clear();
             recyclerHandle.recycle(this);
+            // Reset with null so that recycle() can be called many times but 
only the 1st time takes effect.

Review Comment:
   I am just wandering that since it can be downgrade to shortlive objects, why 
not just `new BitSetRecyclable()` here directly, so we don't need to call 
`recycle` and don't need to set `recycleHandle=null`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to