• 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: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)


  • Subject: Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)
  • From: Rick Mann <email@hidden>
  • Date: Tue, 30 Oct 2012 17:37:15 -0700

On Oct 30, 2012, at 17:35 , Greg Parker <email@hidden> wrote:

> It is. All NS object types are bridged to a generic NSCFType if they aren't bridged to something more specific. CFRetain() et al work on all objects. The CF functions are the recommended and expected solution for explicit memory management in ARC code.
>
> The correct way to write your code is probably
> CFSocketContext ctx;
> ctx.retain = CFRetain;
> ctx.release = CFRelease;
> ctx.info = (__bridge void *)yourObject;

Awesome. That's how I would've wanted it to work. Thanks to all for spelling it out for me.

--
Rick




_______________________________________________

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

References: 
 >ARC conversion help - CFErrorRef* and NSError** (From: Alex Kac <email@hidden>)
 >Re: ARC conversion help - CFErrorRef* and NSError** (From: John McCall <email@hidden>)
 >Re: ARC conversion help - CFErrorRef* and NSError** (From: Rick Mann <email@hidden>)
 >Re: ARC conversion help - CFErrorRef* and NSError** (From: Quincey Morris <email@hidden>)
 >Re: ARC conversion help - CFErrorRef* and NSError** (From: Rick Mann <email@hidden>)
 >Re: ARC conversion help - CFErrorRef* and NSError** (From: Roland King <email@hidden>)
 >CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**) (From: Rick Mann <email@hidden>)
 >Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**) (From: Greg Parker <email@hidden>)
 >Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**) (From: Rick Mann <email@hidden>)
 >Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**) (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)
  • Next by Date: Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)
  • Previous by thread: Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)
  • Next by thread: Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)
  • Index(es):
    • Date
    • Thread