Browse Source

autorelease NSVisualEffectView

Kevin Sawicki 8 years ago
parent
commit
2d8a61a775
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

@@ -1227,8 +1227,8 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
 
   NSVisualEffectView* effect_view = (NSVisualEffectView*)vibrant_view;
   if (effect_view == nil) {
-    effect_view = [[NSVisualEffectView alloc] initWithFrame:
-      [[window_ contentView] bounds]];
+    effect_view = [[[NSVisualEffectView alloc]
+        initWithFrame: [[window_ contentView] bounds]] autorelease];
     [window_ setVibrantView:(NSView*)effect_view];
 
     [effect_view setAutoresizingMask: