> The documentation isn’t wrong. It reflects what’s in the 10.10 SDK headers — > initWithContentsOfFile: and initWithContentsOfURL: are return-typed NSArray* > or NSMutableArray*, while all the others are return-typed instancetype.
Oh yes, indeed, you're right. I didn't really pay attention to what was behind the initWith. > I don’t know why This is most likely an implementation detail, because for some reason it needs a specific implementation of the array. However, it's weird that the init method does that and not e.g. a + (NSArray*)arrayWithContentsOfURL. > My guess is that the Cocoa initWithContentsOf… methods actually return a > different object from the one that was allocated Yup. init methods are free the instance and return a new one. -- Jonathan _______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/objc-language/archive%40mail-archive.com This email sent to [email protected]
