• 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: Memory Mania Revisted
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Mania Revisted


  • Subject: Re: Memory Mania Revisted
  • From: email@hidden
  • Date: Mon, 11 Feb 2002 16:26:45 -0800

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

Interesting. Now, of course, use of zones is discouraged (they are believed to actually make one's app *less* efficient, given the current way memory allocation works in X), opening the way for a new renaissance for +new... ;->

Ben Haller
Stick Software
_______________________________________________
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.

  • Follow-Ups:
    • Re: Memory Mania Revisted
      • From: Izidor Jerebic <email@hidden>
    • Re: Memory Mania Revisted
      • From: Georg Tuparev <email@hidden>
  • Prev by Date: making dynamic NSColorView list
  • Next by Date: Re: about help
  • Previous by thread: Re: Memory Mania Revisted
  • Next by thread: Re: Memory Mania Revisted
  • Index(es):
    • Date
    • Thread