Cocoa methods that return CF objects

Jim Correia jim.correia at pobox.com
Fri Jul 4 19:15:27 PDT 2008


On Jul 4, 2008, at 8:26 PM, Gary L. Wade wrote:

> Without confirmation from Apple, you're pretty much stuck with  
> empirical testing whether you believe you should or should not have  
> to do it. What value is returned when you call CFGetTypeID for an  
> object subclassed from NSObject or even an object of type NSObject?

Well, there are actually 2 questions to ask/answer here.

What is the documented behavior/contract? (This we can rely upon from  
release to release of the OS/frameworks.)

What does CF do?

When the documentation is lacking (is it, in this case?), the answer  
can be found by reading the CF Lite source code. CFGetTypeID will  
return whatever is returned by -_cfTypeID when the input is an Obj-C  
object.

Jim



More information about the MacOSX-dev mailing list