Re: Memory Mania Revisted
Re: Memory Mania Revisted
- Subject: Re: Memory Mania Revisted
- From: Jonathan Hendry <email@hidden>
- Date: Mon, 11 Feb 2002 16:02:03 -0600
Apparently, the shift to [[Foo alloc] init] from +new
happened around NeXTSTEP 2.0, and there may be something
in the 2.0/2.1 release notes.
The rationale was apparently related to the use of memory
zones, using +allocWithZone. Zones were introduced in 2.0
There's some discussion to be found on deja.com, especially
around 1991/1992. The deprecation of +new was apparently
taught at NeXT DevCamp classes.
After 2.0, +new was to be used for Singletons, in which there's only
ever one instance of the class.
It seems that this usage has been set aside in favor of more explicit
method names, such as [NSWorkspace sharedWorkspace] or [NSOpenPanel
openPanel].
(Probably as part of the general move towards more wordy method signatures
in OpenStep.)
_______________________________________________
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.