From e0ee60f290573fa889dbe448b6dd2c4b00a97a8c Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 5 Apr 2016 11:38:58 -0700 Subject: [PATCH] Fix memory leak --- atom/browser/ui/tray_icon_cocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/ui/tray_icon_cocoa.mm b/atom/browser/ui/tray_icon_cocoa.mm index 6d7cdfaf98..ed1a774f2e 100644 --- a/atom/browser/ui/tray_icon_cocoa.mm +++ b/atom/browser/ui/tray_icon_cocoa.mm @@ -89,7 +89,7 @@ const CGFloat kVerticalTitleMargin = 2; // Apply the higlight color if the image is a template image. When this moves // to using the new [NSStatusItem button] API, this should work automagically. if ([image isTemplate] == YES) { - NSImage * imageWithColor = [image copy]; + NSImage * imageWithColor = [image copy] autorelease]; [imageWithColor lockFocus]; [[self colorWithHighlight: highlightContent] set]; CGRect imageBounds = CGRectMake(0,0, image.size.width, image.size.height);