OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
- Subject: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
- From: Jerry Krinock <email@hidden>
- Date: Sat, 03 Nov 2012 12:55:03 -0700
About a year ago, I built a tool which did some XPC and, following documentation I read somewhere, invoked xpc_release(). This little project uses ARC and stills builds OK in Xcode 4.5.2.
I want to absorb it into a big old project that contains a couple dozen targets. So I added a target for it, with ARC. But building the big project fails because the macro OS_OBJECT_USE_OBJC_RETAIN_RELEASE is defined, and in xpc.h this redefines xpcrelease, which is also apparently a macro, to be a function which invokes -release, which is not allowed under ARC.
In the little project, OS_OBJECT_USE_OBJC_RETAIN_RELEASE is not defined. And *I* have not defined it in the big project, in any of my code, but apparently this definition got included somewhere.
How might it have gotten defined, and should it be defined or not? In the documentation of xpc_release(), there is no indication to not use it under ARC. Indeed it could be defined elsewhere, to do something different.
All of the other targets in the big project do not use ARC. Both targets are built with the "Latest" (10.8) SDK.
What's wrong with this picture?
Thanks,
Jerry
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden