From 06a550b412ba085e60a92fb1332d1b28f06f8230 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 28 Jun 2017 12:37:31 -0700 Subject: [PATCH] Autorelease tracking area --- atom/browser/ui/tray_icon_cocoa.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/ui/tray_icon_cocoa.mm b/atom/browser/ui/tray_icon_cocoa.mm index a6b5bb96b03d..629180478e16 100644 --- a/atom/browser/ui/tray_icon_cocoa.mm +++ b/atom/browser/ui/tray_icon_cocoa.mm @@ -58,11 +58,11 @@ const CGFloat kVerticalTitleMargin = 2; [self updateDimensions]; // Add NSTrackingArea for listening to mouseEnter and mouseExit events - NSTrackingArea* trackingArea = [[NSTrackingArea alloc] + auto trackingArea = [[[NSTrackingArea alloc] initWithRect:[self bounds] options:NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways owner:self - userInfo:nil]; + userInfo:nil] autorelease]; [self addTrackingArea:trackingArea]; } return self;