diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 796a40f356ca..3bfacda6d32f 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -119,11 +119,10 @@ bool ScopedDisableResize::disable_resize_ = false; } - (void)updateTrackingAreas { - NSTrackingArea* const trackingArea = - [[NSTrackingArea alloc] initWithRect:NSZeroRect - options:NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways | NSTrackingInVisibleRect - owner:self - userInfo:nil]; + auto trackingArea = [[[NSTrackingArea alloc] initWithRect:NSZeroRect + options:NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways | NSTrackingInVisibleRect + owner:self + userInfo:nil] autorelease]; [self addTrackingArea:trackingArea]; }