...
- ObjC objects that are +alloc'd or -retained are not actually pinned in GC-mode unless they have been CFRetain()'d
- As a counterpoint, any CFRetain()'d ObjC object must be -released or -autoreleased for it's retain count to remain balanced in RR mode
- When the Java object is done with the native object, it must be explicitly "hard" CFRelease()'d
- This balances the "hard" CFRetain() which occurred before it was passed up to Java
- You need to determine if the object is safe to CFRelease() from any thread, or must only be done from the main AppKit thread
- In some cases, releasing an object may do nothing but decrease it's retain count, but in other cases it will cause the object's -dealloc or -finalize method to be called, and those may not be any-thread safe if they point to end up releasing AppKit objects
- The ObjC garbage collector cannot see into the Java heap, and infer if any native objects are still "alive"
...
Overview
Content Tools
ThemeBuilder