Re: Documentation for -release is not quite true
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