Permalink
Browse files

Fix memory leak in window controller

The NSWindow object for a window controller was alloc'ed but never released
when initializing the window controller.
  • Loading branch information...
1 parent c9304c3 commit 621f94828e2fe5b2da1c13ad70d40eba0ac7c10b @b4winckler committed Dec 14, 2007
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/MacVim/MMWindowController.m
@@ -108,7 +108,7 @@ - (id)initWithVimController:(MMVimController *)controller
| NSMiniaturizableWindowMask | NSResizableWindowMask
| NSUnifiedTitleAndToolbarWindowMask;
- // Use textured background on Leopard or later (uncomment this on Tiger for
+ // Use textured background on Leopard or later (skip the 'if' on Tiger for
// polished metal window).
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_4)
styleMask |= NSTexturedBackgroundWindowMask;
@@ -180,6 +180,8 @@ - (id)initWithVimController:(MMVimController *)controller
[win _setContentHasShadow:NO];
}
+ [win release];
+
return self;
}

0 comments on commit 621f948

Please sign in to comment.