Re: Hover button and tracking area questions
Re: Hover button and tracking area questions
- Subject: Re: Hover button and tracking area questions
- From: Kyle Sluder <email@hidden>
- Date: Wed, 23 Jan 2013 23:49:19 -0800
On Wed, Jan 23, 2013, at 11:14 PM, Nick Rogers wrote:
> - (void)updateTrackingAreas
> {
> if (trackingArea) {
> [trackingArea release];
> trackingArea = nil;
> }
I was just working with tracking areas today, and I've come to the
conclusion that this pattern is wrong. There's no need to release and
reinstall your tracking areas every time you get -updateTrackingAreas,
and in fact doing so will cause you to miss -mouseExited: events in the
event that you're getting -updateTrackingAreas because the view that
owns the tracking area has moved.
Regardless, you've failed to implement the pattern properly. You're
never removing the tracking areas before installing new ones. It should
be pretty obvious why this is causing you to crash when messaging zombie
objects.
--Kyle Sluder
_______________________________________________
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