Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: What's with this "new"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's with this "new"?



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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.