[swift-dev] swift_retainCount in CoreFoundation

Joe Groff jgroff at apple.com
Tue Dec 22 17:09:12 CST 2015


> On Dec 22, 2015, at 1:08 PM, Joe Groff via swift-dev <swift-dev at swift.org> wrote:
> 
> It looks like the corelibs implementation of CoreFoundation references swift_retainCount in order to implement CFGetRetainCount. Is getting the retain count necessary to CF functionality, or can these functions be removed?

The only use of CFGetRetainCount in the corelibs that I see appears to be in CFMachPort.c, to drop CFMachPorts that are uniquely referenced from the run loop. Is that file relevant to Linux Foundation? Is this check necessary?

-Joe


More information about the swift-dev mailing list