shreyasva
shreyasva

Reputation: 13456

Implementation of NSArray

How is a NSArray implemented, is it similar to std::vector.

Upvotes: 2

Views: 2016

Answers (2)

justin
justin

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

bbum
bbum

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

Related Questions