• 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: What's with this "new"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's with this "new"?


  • Subject: Re: What's with this "new"?
  • From: Mark Patterson <email@hidden>
  • Date: Mon, 26 Jul 2004 23:59:52 +1000

On 25/07/2004, at 11:51 PM, Finlay Dobbie wrote:

On 25 Jul 2004, at 13:24, Mark Patterson wrote:

I noticed something that I hadn't seen in Hillegass: the +new method, roughly equivalent to [[SomeClass alloc] init]. Is that a new thing, or an old thing? Why does Hillegass do in 2 steps what could be done in one?

+new is old and not really recommended. There have been discussions on this in the past, search the archives.

I've just had a look at http://lists.apple.com/archives/cocoa-dev/2002/Feb/10/ memorymaniarevisted.001.txt
It seems to suggest that +new is not deprecated, but alloc init is clearer for beginners. So I don't think I should feel too dimodi to use it if I think it makes the code more readable.

Regards,
Mark
_______________________________________________
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: 
 >What's with this "new"? (From: Mark Patterson <email@hidden>)
 >Re: What's with this "new"? (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Stopping on objc exceptions in Xcode
  • Next by Date: Re: main nib, secondary nib, where do the outlets get connected to in the main nib?
  • Previous by thread: Re: What's with this "new"?
  • Next by thread: Re: What's with this "new"?
  • Index(es):
    • Date
    • Thread