• 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: Documentation for -release is not quite true
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Documentation for -release is not quite true


  • Subject: Re: Documentation for -release is not quite true
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 23 Aug 2010 19:06:28 -0700

On 2010 Aug 23, at 18:47, Gary L. Wade wrote:

> Have you considered that the code for -release may be implemented in a
> manner like this?
>
> -(oneway void)release
> {
>    if (1 == self->retainCount)
>    {
>        // Let's save a few CPU cycles and not bother
>        // decrementing retainCount since it won't be
>        // around for long.
>        [self dealloc];
>    }
>    else
>    {
>        self->retainCount--;
>    }
> }


Yes, that's exactly how I believe it is implemented.  Therefore the unqualified statement in the documentation that -release "Decrements the receiver’s reference count" is incorrect.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Documentation for -release is not quite true (From: "Gary L. Wade" <email@hidden>)

  • Prev by Date: Re: Documentation for -release is not quite true
  • Next by Date: Re: Another Icon Question
  • Previous by thread: Re: Overriding -release to break retain cycle. Was: Doc for -release not quite true
  • Next by thread: Document Cursor
  • Index(es):
    • Date
    • Thread