summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXInit.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-12-07 02:02:44 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-12-07 02:02:44 (GMT)
commita276f91565b6977f3f437572d730efa562f4cd43 (patch)
tree740de6d2fe3af13e22213ec4ef7e027a3d1d93ee /macosx/tkMacOSXInit.c
parent0b529d0b25a5ec18c4a4134cf3e3cb57395b47ca (diff)
downloadtk-a276f91565b6977f3f437572d730efa562f4cd43.zip
tk-a276f91565b6977f3f437572d730efa562f4cd43.tar.gz
tk-a276f91565b6977f3f437572d730efa562f4cd43.tar.bz2
Fix for zombie windows on El Capitan/OS X 10.11; thanks to Marc Culler for patch
Diffstat (limited to 'macosx/tkMacOSXInit.c')
-rw-r--r--macosx/tkMacOSXInit.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index e861089..98e6824 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -253,10 +253,7 @@ TkpInit(
}
#endif
- static NSAutoreleasePool *pool = nil;
- if (!pool) {
- pool = [NSAutoreleasePool new];
- }
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
[[NSUserDefaults standardUserDefaults] registerDefaults:
[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES],
@@ -327,7 +324,6 @@ TkpInit(
TkMacOSXUseAntialiasedText(interp, -1);
TkMacOSXInitCGDrawing(interp, TRUE, 0);
[pool drain];
- pool = [NSAutoreleasePool new];
/*
* FIXME: Close stdin & stdout for remote debugging otherwise we will