Re: Script Menu: Code generation
Re: Script Menu: Code generation
- Subject: Re: Script Menu: Code generation
- From: Nathan Day <email@hidden>
- Date: Fri, 30 Dec 2005 13:03:45 +1100
It safer it the container object of x is released it will most likely
release x and the caller of -x may still be trying to use the result.
This is most likely to occur in a multi thread app but can also occur
after the caller of -x releases the container of x and expects to
still use the result.
On 29/12/2005, at 9:17 AM, Alexander von Below wrote:
Dear List,
the very useful Scripts menu of Xcode contains an item to create
accessor definitions.
While it is most certainly correct, I am wondering why it produces:
- (id) x {
return [[x retain] autorelease];
}
Is this not redundant? Why not just return x?
I guess that the setter code is a matter of preference. The
original code copies the new value, I have edited it to retain the
value.
Your comments and thoughts on this would be very interesting.
Thanks
Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden