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)
commit071f1518113f42783c99e498bab714ab4a4b38eb (patch)
tree0472f8d999250af4e11717652402caac105a3493 /macosx/tkMacOSXInit.c
parentabf2f765a373e996b93c141d8c4b38f067358129 (diff)
downloadtk-071f1518113f42783c99e498bab714ab4a4b38eb.zip
tk-071f1518113f42783c99e498bab714ab4a4b38eb.tar.gz
tk-071f1518113f42783c99e498bab714ab4a4b38eb.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