• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()


  • Subject: Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Thu, 08 Nov 2012 17:59:29 +0100

Le 8 nov. 2012 à 14:54, Jerry Krinock <email@hidden> a écrit :

> Update on email delays:  Greg, sorry it took so long to reply this; I was waiting to see if your email would arrive.  Although I have definitely been foiled by delays of several hours on this list for many months, it appears that the even-longer delays I saw last week were due to IEEE mail servers in New Jersey being hit by Hurricane Sandy.
>
> * * *
>
> On 2012 Nov 03, at 16:28, Greg Parker <email@hidden> wrote:
>
>> If you build with the 10.8 SDK, and your deployment target is 10.8 or later, then dispatch objects and XPC objects become Objective-C objects. If you use ARC then they are ordinary ARC-managed objects and you do not retain and release them yourself.
>>
>> You can temporarily revert to the old behavior by defining OS_OBJECT_USE_OBJC=0.
>
> Yes, setting setting -DOS_OBJECT_USE_OBJC=0 in the Compiler Flags of the file calling xpc_release(), which is compiled with ARC, fixed the problem.
>
>> Going forward the solution is to remove your manual retain/release calls and let ARC do the work.
>
> Are you saying that if a file is compiled with ARC, I should delete calls to xpc_release()?  Read on…
>
>> You might try re-running the ARC migrator on your ARC code and see if it catches them.
>
> The little project was written with ARC from the ground up.  So I just ran Edit ▸ Convert to Objective-C ARC on it, and  was told that "No source file changes are necessary".  The call to xpc_release() was not noticed.
>
> So, neither the xpc_release() documentation, nor the ARC migrator indicate that I should remove the call to xpc_release().  Are they both missing the boat?

Assuming you are targeting 10.8, yes you should remove all xpc_retain/release and dispatch_retain/release calls.

-- Jean-Daniel





_______________________________________________

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


  • Follow-Ups:
    • Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
      • From: Jerry Krinock <email@hidden>
References: 
 >OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release() (From: Jerry Krinock <email@hidden>)
 >Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release() (From: Greg Parker <email@hidden>)
 >Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release() (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
  • Next by Date: NSAttributedString mysteriously truncated too soon
  • Previous by thread: Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
  • Next by thread: Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
  • Index(es):
    • Date
    • Thread