]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/misc.m
macosx: NSScreen dealloc is not only called at end of execution of course.
[vlc] / modules / gui / macosx / misc.m
index fe57179bc6570417461c169d94bfd4e74c4c5137..c9a4c4a07eadb9bb4aa9de30b295cca0e866f024 100644 (file)
@@ -129,13 +129,14 @@ static NSMutableArray *blackoutWindows = NULL;
 + (void)load
 {
     /* init our fake object attribute */
-    blackoutWindows = [[NSMutableArray alloc] initWithCapacity:1];
+    if( !blackoutWindows )
+        blackoutWindows = [NSMutableArray arrayWithCapacity:1];
 }
 
 - (void)dealloc
 {
+    [blackoutWindows makeObjectsPerformSelector:@selector(close)];
     [blackoutWindows removeAllObjects];
-    [blackoutWindows release];
     [super dealloc];
 }