@Override protected void afterMarshaled(int flags) { super.afterMarshaled(flags); if ((flags & FLAG_NO_RETAIN) == 0) { retain(getHandle()); } }
/** * Creates a new instance of the specified {@link ObjCClass}. If * {@code makePeer == true} this method MUST be called while the * {@link #objcBridgeLock} is held. */ @SuppressWarnings("unchecked") private static <T extends ObjCObject> T createInstance(ObjCClass objCClass, long handle, int afterMarshaledFlags, boolean makePeer) { Class<T> c = (Class<T>) objCClass.getType(); T o = VM.allocateObject(c); o.setHandle(handle); if (makePeer) { setPeerObject(handle, o); } if (objCClass.isCustom()) { VM.setBoolean(VM.getObjectAddress(o) + CUSTOM_CLASS_OFFSET, true); } o.afterMarshaled(afterMarshaledFlags); return o; }
@Override protected void afterMarshaled(int flags) { super.afterMarshaled(flags); if ((flags & FLAG_NO_RETAIN) == 0) { retain(getHandle()); } }
@Override protected void afterMarshaled(int flags) { super.afterMarshaled(flags); if ((flags & FLAG_NO_RETAIN) == 0) { retain(getHandle()); } }
/** * Creates a new instance of the specified {@link ObjCClass}. If * {@code makePeer == true} this method MUST be called while the * {@link #objcBridgeLock} is held. */ @SuppressWarnings("unchecked") private static <T extends ObjCObject> T createInstance(ObjCClass objCClass, long handle, int afterMarshaledFlags, boolean makePeer) { Class<T> c = (Class<T>) objCClass.getType(); T o = VM.allocateObject(c); o.setHandle(handle); if (makePeer) { setPeerObject(handle, o); } if (objCClass.isCustom()) { VM.setBoolean(VM.getObjectAddress(o) + CUSTOM_CLASS_OFFSET, true); } o.afterMarshaled(afterMarshaledFlags); return o; }