Re: MIDIObjectGetStringProperty()
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