Browse Source

adds autorelease to nsimage

gellert 8 years ago
parent
commit
c5fe173e47
1 changed files with 2 additions and 2 deletions
  1. 2 2
      atom/browser/native_window_mac.mm

+ 2 - 2
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];