Well you can read GNUstep’s objc-arc.h (in libobjc2) to get some idea on 
LLVM-defined runtime functions that is required to make ARC work. There are 
functions objc_retain and objc_autorelease (Using those will not get you 
rejected - apple cannot tell your manual calls from calls generated by 
compiler). Also, you can use CFRetain and CFBridgingRelease here that is 
roughly equivalent to the runtime functions.

ARC inserts calls you used to do manually so the calls are still there and by 
hacking a little

On Oct 22, 2013, at 13:14, Jens Alfke <[email protected]> wrote:

> 
> On Oct 21, 2013, at 8:07 PM, Maxthon Chan <[email protected]> wrote:
> 
>> If your app is called Hammersmith, you can retain/autorelease it in your 
>> [CBLDatabase dealloc] or [CBLCache dealloc]
> 
> It’s not my app, it’s a customer’s that uses my library. But the CBL classes 
> are part of my library, yes.
> 
> As for autorelease: "This has come up once before for me, and I was able to 
> work around it by making the cache-owner object call -autorelease instead of 
> -release on the NSCache, to defer the call to the cache’s dealloc. But I’m 
> now using ARC so that isn’t an option.”
> 
> Although there’s probably some hacky way to force an autorelease…
> 
> —Jens

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to