Re: Why not a procedure for retain/release?
Re: Why not a procedure for retain/release?
- Subject: Re: Why not a procedure for retain/release?
- From: mmalcolm crawford <email@hidden>
- Date: Thu, 4 Nov 2004 19:48:23 -0800
On Nov 4, 2004, at 4:19 PM, Mark Patterson wrote:
Since NSObject properties have to be retained and released in their
setter methods, I wrote the little procedure replaceProperty
demostrated below. Is there any reason against doing this sort of
thing? I'm surprised that something done so frequently would be always
done in full.
Apart from the additional overhead and perhaps lack of clarity Ben
mentioned, there's also the fact that, as far as accessors go, one size
does not fit all. There are several different patterns you might wish
to follow for different reasons. See
<http://www.stepwise.com/Articles/Technical/2002-06-11.01.html>. Kevin
Callahan's excellent "Accessorizer"
<http://www.kevincallahan.org/software/accessorizer.html> makes it easy
to create any pattern you want...
Although a feature request comes to mind. It might be useful to be
able to set up pattern preferences, so you could configure one pattern
for attributes, another for relationships etc... perhaps something for
version 1.0? ;-)
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden