Skip to content

Commit

Permalink
Skip some more potentially synchronized code in Pointer with "org…
Browse files Browse the repository at this point in the history
….bytedeco.javacpp.nopointergc" (issue tensorflow/java#313)
  • Loading branch information
saudet committed May 8, 2021
1 parent 343045d commit 0ce97fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/Pointer.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static class DeallocatorReference extends PhantomReference<Pointer> implements D
DeallocatorReference(Pointer p, Deallocator deallocator) {
super(p, referenceQueue);
this.deallocator = deallocator;
this.bytes = p.capacity * p.sizeof();
this.bytes = p.capacity != 0 && referenceQueue != null ? p.capacity * p.sizeof() : 0;
this.count = new AtomicInteger(0);
}

Expand Down

0 comments on commit 0ce97fc

Please sign in to comment.