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 7056999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:56:02+00:00 2026-05-28T03:56:02+00:00

The method has Get in it’s name and doesn’t return something via return .

  • 0

The method has “Get” in it’s name and doesn’t return something via return. It takes a pointer for example to a CFStringRef, like this:

CFStringRef outValue;
UInt32 propertySize = sizeof(outValue);
AudioSessionGetProperty(propertyID, &propertySize, &outValue);

The documentation says that the function “copies” the value into the the provided outValue pointer.

So this is creating an object with a +1 retain count, and I am responsible for releasing / freeing that data?

  • 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-28T03:56:03+00:00Added an answer on May 28, 2026 at 3:56 am

    According to the documentation for AudioSessionGetProperty, it depends on whether the property you are getting is a C type or if it is a core foundation value:

    Some Core Audio property values are C types and others are Core Foundation objects:

    If you call this function to retrieve a value that is a Core
    Foundation object, then this function—despite the use of “Get” in its
    name—duplicates the object. You are responsible for releasing the
    object, as described in “The Create Rule” in Memory Management
    Programming Guide for Core Foundation.

    So if what you are getting is a core foundation property value, you will need to make sure to release the resulting object.

    Note that using ARC will not automatically take care of this for you. From the ARC programming guide:

    In many Cocoa applications, you need to use Core Foundation-style
    objects, whether from the Core Foundation framework itself (such as
    CFArrayRef or CFMutableDictionaryRef) or from frameworks that adopt
    Core Foundation conventions such as Core Graphics (you might use types
    like CGColorSpaceRef and CGGradientRef).

    The compiler does not automatically manage the lifetimes of Core
    Foundation objects; you must call CFRetain and CFRelease (or the
    corresponding type-specific variants) as dictated by the Core
    Foundation memory management rules (see Memory Management Programming
    Guide for Core Foundation).

    If you cast between Objective-C and Core Foundation-style objects, you
    need to tell the compiler about the ownership semantics of the object
    using either a cast (defined in objc/runtime.h) or a Core
    Foundation-style macro (defined in NSObject.h):

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

Sidebar

Related Questions

i get this error {Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL.}
I have a method private static DataTable ParseTable(HtmlNode table) and sometimes this method has
In App Engine, according to the JavaDoc , the getTypeRank method has this signature:
I'm trying to invoke a method with reflection that has a generic return type,
I am having this particular requirement where a method has to be identified by
I've found out that the object of type google.maps.Map has method get(), which is
So I have a helper method that looks something like the following: private D
I have a controller method in ASP.NET MVC that looks like this: public ActionResult
Something confuses me here: The NSXMLParser method has a namespaceURI attribute: - (void)parser:(NSXMLParser *)parser
The TextRenderer.DrawText method has a TextFormatFlags parameter. Using TextFormatFlags.EndEllipsis allows you to abbreviate the

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.