- Can any one explain me what is '__bridge_transfer' and '_bridge' & when to use '_bridge_transfer' and '__bridge'
- I read something like its deals with ARC, So what is the main function of these both
Thanks,
Thanks,
These keywords are used to tell to ARC system how to handle your non-objective-c pointers. In essence, if you use __bridge, you are telling to ARC not to deal with the ownership of the converted pointer because you will free it from non-objective-c code, most likely with a free() or a CFRelease... type function. __bridge_transfer, on the other hand, transfers the ownership to ARC and ARC will free your objective-c (and thus also the original non-objective-c) object via the standard release mechanism when the references to that object hits zero.