IOS CF data structures and NS data structures

I was wondering what exactly the differences are between CF data structures (CFArray, CFDictionary, etc.) and NS data structures (NSArray, NSDictionary, etc.). I mainly use NS classes, but I found that CF classes have better performance and have some advantage over NS classes. I would appreciate it if someone could explain the pros and cons in detail.

+4
source share
1 answer

NS (Stands for NextStep), which is fully object oriented Objective-c and CF (Stands for Core Foundation), which are C-based APIs. Memory management varies depending on the structure used.

In terms of performance, if you really have performance bottlenecks, and you understand that memory management with C, I will move on to Objective-C. Now, with his garbage collection, the pain went away.

+5
source

All Articles