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

Re: ARC conversion help - CFErrorRef* and NSError**


  • Subject: Re: ARC conversion help - CFErrorRef* and NSError**
  • From: Rick Mann <email@hidden>
  • Date: Tue, 30 Oct 2012 02:39:40 -0700

On Oct 29, 2012, at 23:23 , Quincey Morris <email@hidden> wrote:

> Except that they're not equivalent, in memory management terms. CF and NS objects have different rules.
>
> IIRC, it's also not safe to assume that CF and NS (when toll-free bridged for a class) use the same underlying classes. In some cases they do (often these are "NSCFxxx" classes at run time), but in a few cases they don't. In yet other cases (collection classes, for example) it's possible to create CF objects of a nominally toll-free bridged class which don't work correctly as NS objects using NS method access (collections that contain non-object pointers or that use non-standard memory allocators, for example).

Well, whatever the __attribute__ is, I'm sure it could specify all that.

Then again, I ran into a problem that I don't know how to properly solve, using CFSockets. I need to retain an NSObject I pass into CFSocket, and have it released when the socket is released, not when a callback occurs, but there's no good way to do that.

--
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

  • Follow-Ups:
    • Re: ARC conversion help - CFErrorRef* and NSError**
      • From: Ken Thomases <email@hidden>
    • Re: ARC conversion help - CFErrorRef* and NSError**
      • From: Roland King <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>)

  • Prev by Date: Re: how to clip inside a path
  • Next by Date: Re: ARC conversion help - CFErrorRef* and NSError**
  • Previous by thread: Re: ARC conversion help - CFErrorRef* and NSError**
  • Next by thread: Re: ARC conversion help - CFErrorRef* and NSError**
  • Index(es):
    • Date
    • Thread