0
When might you use a CFArray/Dictionary instead of a NSArray/Dictionary?

Open 1 Answers 18 Views Technology

When might you use a CFArray/Dictionary instead of a NSArray/Dictionary?

1 Answer

0

Core Foundation is the brains of the operation. It’s written mostly in C. It was created with Apple’s acquisition of NEXT and their APIs and owes a lot to them. The NS* classes are often just Objective C abstract interfaces built on top of the CF* types. So, when you ask why both CFArray and NSArray exist, the answer is that they actually don’t. NSArrays are CFArrays, NSStrings are CFStrings, etc. That’s why toll-free-bridging is possible.

by (236k points)
...