By TeaCupApp

2012-05-31 13:23:00 8 Comments

What is the different between,

(CFDataRef) data


(__bridge CFDataRef) data

Xcode asked me to change it to bridge. Is that because of ARC?


@Mike Weller 2012-05-31 13:25:27

Yes, ARC needs to be given instructions when you cast between toll-free bridged types. In this case __bridge tells ARC to do nothing, so this will behave the same as the previous standard cast.

You can read the Transitioning to ARC Release Notes for more details on the different ways to do bridging casts.

@TeaCupApp 2012-05-31 13:39:31

Thanks for the link! very helpful

Related Questions

Sponsored Content

26 Answered Questions

[SOLVED] How do I sort an NSMutableArray with custom objects in it?

94 Answered Questions

23 Answered Questions

[SOLVED] How do I check if a string contains another string in Objective-C?

7 Answered Questions

[SOLVED] Version vs build in Xcode

  • 2011-07-27 21:48:15
  • chris
  • 146094 View
  • 654 Score
  • 7 Answer
  • Tags:   ios xcode

26 Answered Questions

[SOLVED] What's the difference between the atomic and nonatomic attributes?

14 Answered Questions

[SOLVED] Constants in Objective-C

8 Answered Questions

[SOLVED] Objective-C ARC: strong vs retain and weak vs assign

19 Answered Questions

11 Answered Questions

3 Answered Questions

[SOLVED] ARC and bridged cast

Sponsored Content