protected void doDispose() { // Only release once long handle = getHandle(); if (handle != 0) { release(handle); } }
protected void dispose(boolean finalizing) { long handle = getHandle(); if (handle != 0) { doDispose(); setHandle(0); } if (finalizing) { try { super.finalize(); } catch (Throwable e) { throw new RuntimeException(e); } } }
@MarshalsPointer public static long toNative(CFType o, long flags) { if (o == null) { return 0L; } if ((flags & (CALL_TYPE_CALLBACK | CALL_TYPE_GLOBAL_VALUE | CALL_TYPE_STRUCT_MEMBER)) > 0) { // Make sure the object outlives the GC o.retain(); } return o.getHandle(); } }
protected void doDispose() { // Only release once long handle = getHandle(); if (handle != 0) { release(handle); } }
protected void doDispose() { // Only release once long handle = getHandle(); if (handle != 0) { release(handle); } }
protected void dispose(boolean finalizing) { long handle = getHandle(); if (handle != 0) { doDispose(); setHandle(0); } if (finalizing) { try { super.finalize(); } catch (Throwable e) { throw new RuntimeException(e); } } }
protected void dispose(boolean finalizing) { long handle = getHandle(); if (handle != 0) { doDispose(); setHandle(0); } if (finalizing) { try { super.finalize(); } catch (Throwable e) { throw new RuntimeException(e); } } }
@MarshalsPointer public static long toNative(CFType o, long flags) { if (o == null) { return 0L; } if ((flags & (CALL_TYPE_CALLBACK | CALL_TYPE_GLOBAL_VALUE | CALL_TYPE_STRUCT_MEMBER)) > 0) { // Make sure the object outlives the GC o.retain(); } return o.getHandle(); } }
@MarshalsPointer public static long toNative(CFType o, long flags) { if (o == null) { return 0L; } if ((flags & (CALL_TYPE_CALLBACK | CALL_TYPE_GLOBAL_VALUE | CALL_TYPE_STRUCT_MEMBER)) > 0) { // Make sure the object outlives the GC o.retain(); } return o.getHandle(); } }