public boolean hasObject() { return descriptor().getHandle() == Wrapper.DESCRIPTOR.getHandle(); }
public ObjCBlock toObjCBlock(Object o) { if (o == null) { return null; } // Create an Objective-C block struct which looks like it was // allocated on the stack. The struct will be GC reachable during // the duration of the call to the Objective-C side. The Objective-C // side will copy the block if it needs to call it later which will // trigger a call to the copy() method below. The GC will reclaim // the struct memory area some time after the call has finished but // the Java block instance (e.g. VoidBlock) will be retained on // every copy and only GCed after all copies have been deallocated. ObjCBlock block = new ObjCBlock() .isa(NSStackBlock) .flags(flags) .invoke(callbackImpl) .descriptor(DESCRIPTOR) .object(o) .wrapper(this); return block; }
public boolean hasObject() { return descriptor().getHandle() == Wrapper.DESCRIPTOR.getHandle(); }
public ObjCBlock toObjCBlock(Object o) { if (o == null) { return null; } // Create an Objective-C block struct which looks like it was // allocated on the stack. The struct will be GC reachable during // the duration of the call to the Objective-C side. The Objective-C // side will copy the block if it needs to call it later which will // trigger a call to the copy() method below. The GC will reclaim // the struct memory area some time after the call has finished but // the Java block instance (e.g. VoidBlock) will be retained on // every copy and only GCed after all copies have been deallocated. ObjCBlock block = new ObjCBlock() .isa(NSStackBlock) .flags(flags) .invoke(callbackImpl) .descriptor(descriptor) .object(o) .wrapper(this); return block; }