On 30 Oct, 2012, at 5:39 PM, Rick Mann <rm...@latencyzero.com> 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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com