We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
synchronized
Pointer
1 parent 343045d commit 0ce97fcCopy full SHA for 0ce97fc
src/main/java/org/bytedeco/javacpp/Pointer.java
@@ -283,7 +283,7 @@ static class DeallocatorReference extends PhantomReference<Pointer> implements D
283
DeallocatorReference(Pointer p, Deallocator deallocator) {
284
super(p, referenceQueue);
285
this.deallocator = deallocator;
286
- this.bytes = p.capacity * p.sizeof();
+ this.bytes = p.capacity != 0 && referenceQueue != null ? p.capacity * p.sizeof() : 0;
287
this.count = new AtomicInteger(0);
288
}
289
0 commit comments