summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXInit.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2016-01-09 02:58:47 (GMT)
committerKevin Walzer <kw@codebykevin.com>2016-01-09 02:58:47 (GMT)
commit3e525786724c39e02e20eda8c5684ce7c0ec7e00 (patch)
tree0472f8d999250af4e11717652402caac105a3493 /macosx/tkMacOSXInit.c
parent43554959e209cc2aaf81dbbb6909cf9d77cf57f4 (diff)
downloadtk-3e525786724c39e02e20eda8c5684ce7c0ec7e00.zip
tk-3e525786724c39e02e20eda8c5684ce7c0ec7e00.tar.gz
tk-3e525786724c39e02e20eda8c5684ce7c0ec7e00.tar.bz2
Additional fixes for memory leaks, window flickering on OS X 10.11; thanks to Marc Culler for patch
Diffstat (limited to 'macosx/tkMacOSXInit.c')
-rw-r--r--macosx/tkMacOSXInit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 997d306..b965a38 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -105,10 +105,9 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
- (void) _setup: (Tcl_Interp *) interp
{
_eventInterp = interp;
- _mainPool = nil;
+ _mainPool = [NSAutoreleasePool new];
[NSApp setPoolProtected:NO];
_defaultMainMenu = nil;
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
[self _setupMenus];
[self setDelegate:self];
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
@@ -117,7 +116,6 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
#endif
[self _setupWindowNotifications];
[self _setupApplicationNotifications];
- [pool drain];
}
- (NSString *) tkFrameworkImagePath: (NSString *) image