Normal casting vs bridge casting in Objective - C

13,046

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.

Share:
13,046
TeaCupApp
Author by

TeaCupApp

Mobile Application Developer

Updated on June 14, 2022

Comments

  • TeaCupApp
    TeaCupApp about 2 years

    What is the different between,

    (CFDataRef) data
    

    &

    (__bridge CFDataRef) data
    

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