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

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: 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. Before, I used explicit retain and

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

2012-10-30 Thread Greg Parker
On Oct 30, 2012, at 4:59 PM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: 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

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

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 17:10 , Greg Parker gpar...@apple.com wrote: On Oct 30, 2012, at 4:59 PM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: how did you do it before, in non-ARC, what's the code look like? There must be a combination of

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

2012-10-30 Thread Roland King
On 31 Oct, 2012, at 7:59 AM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: 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

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

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 17:27 , Roland King r...@rols.org wrote: I must be missing something here. Why can't you just set up your CFSocketContext with CFRetain for the CFAllocatorRetainCallback, CFRelease for the CFAllocatorReleaseCallback and cast the object to the (void*)info paramter with

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

2012-10-30 Thread Roland King
On 31 Oct, 2012, at 8:30 AM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 17:27 , Roland King r...@rols.org wrote: I must be missing something here. Why can't you just set up your CFSocketContext with CFRetain for the CFAllocatorRetainCallback, CFRelease for the

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

2012-10-30 Thread Greg Parker
On Oct 30, 2012, at 5:12 PM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 17:10 , Greg Parker gpar...@apple.com wrote: On Oct 30, 2012, at 4:59 PM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: how did you do it before, in

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

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 17:35 , Greg Parker gpar...@apple.com 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

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

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 17:27 , Roland King r...@rols.org wrote: I must be missing something here. Why can't you just set up your CFSocketContext with CFRetain for the CFAllocatorRetainCallback, CFRelease for the CFAllocatorReleaseCallback and cast the object to the (void*)info paramter with

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

2012-10-30 Thread Roland King
It's not needed after the call has finished, just used to create the socket, so no retain or copy needed. On 31 Oct, 2012, at 10:16, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 17:27 , Roland King r...@rols.org wrote: I must be missing something here. Why can't you just

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

2012-10-30 Thread Ken Thomases
On Oct 30, 2012, at 9:20 PM, Roland King wrote: On 31 Oct, 2012, at 10:16, Rick Mann rm...@latencyzero.com wrote: One thing that's not clear in the docs for CFSocketCreateConnectedToSocketSignature() is what happens to the CFSocketSignature parameter. Is that information copied