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

  • Home
  • SEARCH
  • 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 4071570
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:46:26+00:00 2026-05-20T16:46:26+00:00

I was reading this http://lists.apple.com/archives/objc-language/2011/Mar/msg00084.html This is a long (interesting) thread, and i may

  • 0

I was reading this
http://lists.apple.com/archives/objc-language/2011/Mar/msg00084.html

This is a long (interesting) thread, and i may well have missed the point…

This bit caught my eye

    char* path = [string fileSystemRepresentation];
    CFRetain (path);
    int result = open (path, ...);
    CFRelease (path);

I know that you can’t do this when not garbage collected (char* is not a CFType). Does this do anything when garbage collection is enabled?

My thought is that this is a mistake, or it is not actually being proposed as a solution, although this is how i read it.

  • 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-20T16:46:27+00:00Added an answer on May 20, 2026 at 4:46 pm

    Yes, it’s a mistake; CFRetain only works on CFTypes. C pointers/structures are not garbage collected, even with GC enabled. In non-GC, the string is placed in an autorelease pool, so you don’t need to worry about it until the pool is drained. If you do need to hold onto the string, then you need to make a copy of it.

    You might find the section of the docs on interior pointers useful; the char * you’re getting back is essentially an interior pointer though you don’t have access to its containing object.

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

Sidebar

Related Questions

I was reading this article on Coding Horror: http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html I went to the downloads
I was reading this http://developer.android.com/guide/topics/wireless/bluetooth.html#QueryingPairedDevices which is allot of help on how to pair,connect
I was reading this paper from Apple: http://developer.apple.com/library/mac/documentation/cocoa/conceptual/OOP_ObjC/OOP_ObjC.pdf where it talks about OOP which
After reading this: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it I came to the conclusion that it is not valid
Reading this article http://support.microsoft.com/kb/813878 I have a question: Where can I get ipseccmd.exe for
just was reading this article http://highscalability.com/blog/2010/3/23/digg-4000-performance-increase-by-sorting-in-php-rather-than.html And found this nice article http://wiki.apache.org/cassandra/DataModel I just
I was reading this today: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#default-parameter-values and I can't seem to understand what's happening
So , I've been reading this article: http://msdn.microsoft.com/en-us/library/aa290051%28VS.71%29.aspx And I would like to define
I saved my project.apk file, and I was reading this document: http://developer.android.com/guide/publishing/app-signing.html#setup and they
Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/ In it, the author argues the case

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.