Re: Delegates -- WHAT is delegated?
Re: Delegates -- WHAT is delegated?
- Subject: Re: Delegates -- WHAT is delegated?
- From: Nir Soffer <email@hidden>
- Date: Thu, 21 Dec 2006 01:05:15 +0200
On Dec 21, 2006, at 00:16, Dustin Voss wrote:
* A delegating class should clean up its delegate references by
calling [self setDelegate:nil] before destroying itself.
What do you gain by removing the reference to your delegate when you
are deallocting yourself? Obviously you or one of the super classes
will not call the delegate in their -dealloc method?
- (void)dealloc
{
delegate = nil;
[super dealloc];
}
I think it is the delegate responsibility to remove itself from the
object it serve when it destroy itself.
Best Regards,
Nir Soffer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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