adds autorelease to nsimage

This commit is contained in:
gellert 2017-01-06 14:32:34 +01:00
parent 456ea04683
commit c5fe173e47

View file

@ -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];