• 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: "Ben Kennedy" <email@hidden>
  • Date: Thu, 4 Nov 2004 19:51:40 -0500
  • Organization: Zygoat Creative Technical Services

On 05 11 2004 at 7:19 pm -0500, 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?

Well, the only benefit you gain from that is saving a few characters of
typing.  On the other hand, it introduces an extra function call (50%
more overhead).  One could argue the code is less clear for the same
reason.  If you insist on doing this, maybe a macro would be better (to
avoid the function call).

-b

--
Ben Kennedy, chief magician
zygoat creative technical services
613-228-3392 | 1-866-466-4628
http://www.zygoat.ca


 _______________________________________________
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: Lame problem with NSImageView
  • Next by Date: Re: How to associate a view with Color Panel
  • Previous by thread: Why not a procedure for retain/release?
  • Next by thread: Re: Why not a procedure for retain/release?
  • Index(es):
    • Date
    • Thread