• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Ugly bug in Foundation, beware! (From: Ondra Cada <email@hidden>)
 >Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!) (From: Alastair Houghton <email@hidden>)
 >Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!) (From: Ondra Cada <email@hidden>)
 >Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!) (From: Alastair Houghton <email@hidden>)
 >Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!) (From: Brent Gulanowski <email@hidden>)

  • Prev by Date: Re: Why is "." a decimal number? (NSScanner question)
  • Next by Date: Mutable and Immutable Designs
  • Previous by thread: Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
  • Next by thread: Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
  • Index(es):
    • Date
    • Thread