On Jul 18, 2008, at 1:48 PM, Andy Lee wrote:

On Jul 18, 2008, at 4:19 PM, mmalc crawford wrote:
On Jul 18, 2008, at 11:51 AM, Andy Lee wrote:

NSString *name = [aPerson name];
[aPerson setName:@"Fido"];
NSLog(@"Old name: %@", name);

And calling the return value from -name "autoreleased" would imply the second implementation, which might not be the case.

Indeed.

Out of curiosity, is this what the docs mean in the few places they say a return value is autoreleased, or is that just someone making the same old mistake?

I don't know for each individual case, but I suspect it's more likely to be the same old mistake. Each really ought to be investigated.


Moreover, saying that an object is "autoreleased" also implies the overhead of adding it to an autorelease pool, suggesting that it may be more expensive to retrieve the object than is actually the case.
Okay... I thought I had a reasonable suggestion but I see it was a pretty crappy one. I'll see if I can get comfortable with the ownership terminology.

Looking at your earlier reply, I take the point about "ownership" -- if someone can come up with something better, that would be great!

mmalc

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to