Having read this topic https://www.couchbase.com/forums/t/whats-the-best-recommended-aproach-for-couchbase-net-sdk/25195 I desided to give it a try to run SDK 2.7 without close/dispose bucket. To my horror I found in the log a lot of entries like these:
2020/05/07 20:39:52.590|DEBUG|Creating bucket refCount# 2319 |Couchbase.CouchbaseBucket|
2020/05/07 20:39:52.602|DEBUG|Bootstraping was already done, returning existing bucket |Couchbase.Core.ClusterController|
2020/05/07 20:39:52.637|DEBUG|Creating bucket refCount# 2320 |Couchbase.CouchbaseBucket|
2020/05/07 20:39:52.651|DEBUG|Bootstraping was already done, returning existing bucket |Couchbase.Core.ClusterController|
2020/05/07 20:39:52.665|DEBUG|Creating bucket refCount# 2321 |Couchbase.CouchbaseBucket|
2020/05/07 20:39:52.678|DEBUG|Bootstraping was already done, returning existing bucket |Couchbase.Core.ClusterController|
My question: Is it only a reference counter incremented here or there are some new resources allocated with each new reference to existing bucket? And is there any limit on reference counter?
Thank you in advance.