• 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: Why not a procedure for retain/release?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Why not a procedure for retain/release? (From: Mark Patterson <email@hidden>)

  • Prev by Date: Re: Internationalization: How to bring the locale in line with the language?
  • Next by Date: Re: NSArrayController and retainCount
  • Previous by thread: Re: Why not a procedure for retain/release?
  • Next by thread: what is NSPathStore2
  • Index(es):
    • Date
    • Thread