• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MIDIObjectGetStringProperty()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDIObjectGetStringProperty()


  • Subject: Re: MIDIObjectGetStringProperty()
  • From: Doug Wyatt <email@hidden>
  • Date: Thu, 16 Mar 2006 10:50:04 -0800

On Mar 15, 2006, at 12:03, Rick Cohen wrote:
If I use MIDIObjectGetStringProperty() to retrieve an object's name (e.g. using kMIDIPropertyDisplayName in arg #2), do I need to CFRelease the returned CFStringRef (arg #3)? Most Carbon funcs that return a string ref seem to have the word "Copy" in their function definition, and their documentation mentions releasing the reference after you're done working with it (e.g. CopyMenuItemAsCFString())

Hi Rick,

From MIDIServices.h:

	Note about CoreFoundation data types (CFString, CFData, CFDictionary)

When passing a CF object to a MIDI function, the MIDI function will never consume a
reference to the object; the caller always retains a reference which it is responsible for
releasing with CFRelease().


When receiving a CF object as a return value from a MIDI function, the caller always
receives a new reference to the object, and is responsible for releasing it.


Doug

--
Doug Wyatt
Core Audio, Apple

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >MIDIObjectGetStringProperty() (From: Rick Cohen <email@hidden>)

  • Prev by Date: Re: AULab set properties before initializing
  • Next by Date: useful return values for Audio Unit callbacks?
  • Previous by thread: MIDIObjectGetStringProperty()
  • Next by thread: DVD-Audio playback support?
  • Index(es):
    • Date
    • Thread