Reputation: 13456
How is a NSArray implemented, is it similar to std::vector
.
Upvotes: 2
Views: 2016
Reputation: 104698
depending on the details you're after, you may be interested in reading the implementation of CFArray, which is available in CFLite (or CF-Lite).
CFLite is hosted by Apple, it is an open implementation of a subset of CoreFoundation.framework. i am also assuming you are aware of the NSArray<->CFArray relation.
Upvotes: 2
Reputation: 162712
It is not similar to std::vector
.
The implementation details are opaque beyond that it is tuned to the most common uses found on the platform.
This should provide some insight.
Upvotes: 12