We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e674dde commit 3928276Copy full SHA for 3928276
1 file changed
src/main/java/software/amazon/awssdk/crt/CrtResource.java
@@ -244,7 +244,13 @@ public long getNativeHandle() {
244
* Increments the reference count to this resource.
245
*/
246
public void addRef() {
247
- refCount.incrementAndGet();
+ int remainingRefs = refCount.incrementAndGet();
248
+
249
+ if (debugNativeObjects) {
250
+ Log.log(ResourceLogLevel, Log.LogSubject.JavaCrtResource,
251
+ String.format("Instance of class %s(%d) is adding a reference. RefCount is now %d",
252
+ this.getClass().getCanonicalName(), id, remainingRefs));
253
+ }
254
}
255
256
/**
0 commit comments