From c5fe173e479cd478c2d5b52a33261764a67febe4 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 6 Jan 2017 14:32:34 +0100 Subject: [PATCH] adds autorelease to nsimage --- atom/browser/native_window_mac.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index ec5d94052f50..3d21c0a01984 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -1296,7 +1296,7 @@ void NativeWindowMac::SetVibrancy(const std::string& type) { CGFloat radius = 5.0f; CGFloat dimension = 2 * radius + 1; NSSize size = NSMakeSize(dimension, dimension); - NSImage* maskImage = [NSImage imageWithSize:size + NSImage* maskImage = [[NSImage imageWithSize:size flipped:NO drawingHandler:^BOOL(NSRect rect) { NSBezierPath* bezierPath = [NSBezierPath @@ -1306,7 +1306,7 @@ void NativeWindowMac::SetVibrancy(const std::string& type) { [[NSColor blackColor] set]; [bezierPath fill]; return YES; - }]; + }] autorelease]; [maskImage setCapInsets:NSEdgeInsetsMake(radius, radius, radius, radius)]; [maskImage setResizingMode:NSImageResizingModeStretch];