Re: ARC conversion help - CFErrorRef* and NSError**
Re: ARC conversion help - CFErrorRef* and NSError**
- Subject: Re: ARC conversion help - CFErrorRef* and NSError**
- From: Roland King <email@hidden>
- Date: Tue, 30 Oct 2012 18:15:36 +0800
On 30 Oct, 2012, at 5:39 PM, Rick Mann <email@hidden> wrote:
>
> 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
how did you do it before, in non-ARC, what's the code look like? There must be a combination of CFBridgingRetain(), CFBridgingRelease() and (__bridge .. ) you can use to do what you're doing.
If this is for the void* info pointer in a CFSocketContext then I'd make the retain callback CFRetain(), the release callback CFRelease and send the NSObject in with (__bridge void*)object. If it's not that, what call are you trying to ARC-ize?
_______________________________________________
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