Re: Overriding the release mehod
Re: Overriding the release mehod
- Subject: Re: Overriding the release mehod
- From: Doug Hill <email@hidden>
- Date: Wed, 25 Jan 2017 11:04:06 -0800
> On Jan 25, 2017, at 10:59 AM, Dave <email@hidden> wrote:
>
> Hi,
>
>> Look at Apple's Foundation NSObject protocol reference document for the -release method. It includes this statement:
>
> Could you point me to the URL I still can’t find it. Apple’s documentation is absolutely shocking! I’m looking at https://developer.apple.com/reference/objectivec/protocol?language=objc but no mention of release to be found?
>
> All the Best
> Dave
https://developer.apple.com/reference/objectivec/1418956-nsobject?language=objc <https://developer.apple.com/reference/objectivec/1418956-nsobject?language=objc>
release - Decrements the receiver’s reference count.
Language - Objective-C
Declaration
- (oneway void)release;
Discussion
The receiver is sent a dealloc message when its reference count reaches 0.
You would only implement this method to define your own reference-counting scheme. Such implementations should not invoke the inherited method; that is, they should not include a release message to super.
_______________________________________________
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