Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
- Subject: Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
- From: Charles Srstka <email@hidden>
- Date: Fri, 4 Jun 2004 16:43:42 -0500
On Jun 3, 2004, at 11:19 AM, Brent Gulanowski wrote:
But isn't it enough to have and use -arrayWithArray: (or
dictionaryWithDictionary: etc.) as Ondra said? Why have two methods
that do virtually the same thing?
newArray = [myArray copy]; // gets a retained object
newArray = [NSArray arrayWithArray:myArray]; // gets an autoreleased
object
And of course, there's the issue of polymorphism, which others have
brought up...
Unless, again, you really want to use -<collection>with<Collection>
... ?
Maybe you really want to use initWithArray:copyItems: ... ?
Charles
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.