Re: Memory Mania Revisted
Re: Memory Mania Revisted
- Subject: Re: Memory Mania Revisted
- From: Ondra Cada <email@hidden>
- Date: Sun, 10 Feb 2002 03:28:22 +0100
bhaller,
>
>>>>> email@hidden (b) wrote at Sat, 9 Feb 2002 12:50:02 -0800:
b> The current documentation for NSObject indicates that +new is alive
b> and well.
In my guess, it is just a remnant of pre-OpenStep days.
Well, as for the theory, ie. whether it was "oficially" deprecated by some
whitepaper or not, let's somebody from Apple say -- I'm not sure. What I *do*
know though is that (a) new and similar does not autorelease, (b) in many
places Apple explicitly says "but for copy, mutableCopy and alloc, anything
autoreleases /or returns a shared instance/" -- and (a) plus (b) to me
cleanly means "the +new family is deprecated and forgot".
And as for the practice, would you kindly point out a few standard
Foundation or AppKit classes which use new (or some variant of newWith...) as
part of their standard API? Also you might offer some ideas why -- if "new
is alive and well" -- those standard examples and recommendations use
[[NSAutoreleasePool alloc] init], or alike, although [NSAutoreleasePool new]
would work as well, and be even shorter?
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.