Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7047205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:44:34+00:00 2026-05-28T02:44:34+00:00

The ARC Migration Tool is having trouble with this: NSURL *fileURL = [NSURL fileURLWithPath:path];

  • 0

The ARC Migration Tool is having trouble with this:

NSURL *fileURL = [NSURL fileURLWithPath:path];
AudioFileOpenURL((CFURLRef)fileURL, kAudioFileReadPermission, 0, &fileID);

In particular, it isn’t sure about if it should do a __bridge or __bridge_retained. And I’m either.

-fileURLWithPath returns an autoreleased object, and in this place I’m not the owner of fileURL. But at the same time, the object has a retain count of at least +1.

I’d bet this has to be done with __bridge only.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:44:35+00:00Added an answer on May 28, 2026 at 2:44 am

    You want to use the regular __bridge cast only for this. You would use __bridge_retained only if you want to manage the lifecycle of a cast CF object. For example:

    CFStringRef cf_string = (__bridge_retained CFStringRef)someNSString;
    // some long time later, perhaps in another method etc
    CFRelease(cf_string);
    

    So the __bridge_retained is really telling the compiler that you had an ARC object and now you want to basically turn it into a CF object that you’re going to manage directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

See this jsFiddle post for a working arc drawing; thanks to Simon Sarris for
With all this new ARC stuff (which does not fall under NDA…) coming out,
Clang has new feature called ARC. Concept looks cool. Is this feature support detecting
I'm trying to migrate to ARC but I get this error, i really don't
I'm using ARC and getting a warning saying Capturing 'request' strongly in this block
i try to draw arc in view i use this code. - (void)viewDidLoad {
My app uses ARC and I've got into trouble with some third party software
This is about ARC in IOS 5. Suppose it is ARC enabled and I
The Transitioning to ARC Release Notes makes this statement: One issue to be aware
Is there a way to draw an arc using points in JavaScript?? I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.