47 private final long nativeRef;
48 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
50 private CppProxy(
long nativeRef)
52 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
53 this.nativeRef = nativeRef;
56 private native
void nativeDestroy(
long nativeRef);
57 public void _djinni_private_destroy()
59 boolean destroyed = this.destroyed.getAndSet(
true);
60 if (!destroyed) nativeDestroy(this.nativeRef);
62 protected void finalize() throws
java.lang.Throwable
64 _djinni_private_destroy();
73 assert !this.destroyed.get() :
"trying to use a destroyed object";
74 return native_getArrow(this.nativeRef);
76 private native
IconMapObject native_getArrow(
long _nativeRef);
81 assert !this.destroyed.get() :
"trying to use a destroyed object";
82 return native_getAccuracyCircle(this.nativeRef);
84 private native
CircleMapObject native_getAccuracyCircle(
long _nativeRef);