• 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: retainCount
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retainCount


  • Subject: Re: retainCount
  • From: Finlay Dobbie <email@hidden>
  • Date: Fri, 5 Oct 2001 23:37:20 +0100

On Friday, October 5, 2001, at 11:31 pm, Rosyna wrote:

Well, lets say I reuse this function about 100 times. I pass this function an object, I want the function to release the object regardless of the state of the object.

No, you don't. It should retain the object while it needs it to stick around, and release it when it doesn't need it any more -- nothing more, nothing less. It should *NEVER* have to worry about the object's state -- that's outside its scope of responsibility.

-- Finlay


  • Follow-Ups:
    • Re: retainCount
      • From: Rosyna <email@hidden>
References: 
 >Re: retainCount (From: Rosyna <email@hidden>)

  • Prev by Date: Re: retainCount
  • Next by Date: Re: retainCount
  • Previous by thread: Re: retainCount
  • Next by thread: Re: retainCount
  • Index(es):
    • Date
    • Thread