Re: ARC dealloc best pratice
Re: ARC dealloc best pratice
- Subject: Re: ARC dealloc best pratice
- From: Steve Mills <email@hidden>
- Date: Wed, 11 Feb 2015 13:17:09 -0600
On Feb 6, 2015, at 11:34:35, Kyle Sluder <email@hidden> wrote:
>
> Dealloc is too late for a lot of this stuff. I try to keep -dealloc as
> pure as possible; that is, -dealloc should only be concerned with memory
> management.
>
> Removing observers, unbinding, unregistering notifications, and timer
> invalidation all happens in -viewWillMoveToWindow: or another similar
> place.
I'm curious where you put such housekeeping tasks for window controllers, if dealloc is the wrong place. Override close? Handle windowWillClose?
--
Steve Mills
Drummer, Mac geek
_______________________________________________
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