I want to see EXACTLY how it creates an array. How can I view the .m files that show how it\'s done?
GNUstep, the GNU implementation of the OPENSTEP spec from which Cocoa and Cocoa Touch descend, implements +arrayWithArray:
as follows:
/**
* Returns a new autoreleased NSArray instance containing all the objects from
* array, in the same order as the original.
*/
+ (id) arrayWithArray: (NSArray*)array
{
id o;
o = [self allocWithZone: NSDefaultMallocZone()];
o = [o initWithArray: array];
return AUTORELEASE(o);
}
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSArray.m?view=markup