diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-12-07 02:02:44 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-12-07 02:02:44 (GMT) |
commit | 6aad9c9b454d5334c3e36cd2bf623dae8369defe (patch) | |
tree | 740de6d2fe3af13e22213ec4ef7e027a3d1d93ee /macosx/tkMacOSXNotify.c | |
parent | 3c354d91432f5a951efb12e957299cacdeafb897 (diff) | |
download | tk-6aad9c9b454d5334c3e36cd2bf623dae8369defe.zip tk-6aad9c9b454d5334c3e36cd2bf623dae8369defe.tar.gz tk-6aad9c9b454d5334c3e36cd2bf623dae8369defe.tar.bz2 |
Fix for zombie windows on El Capitan/OS X 10.11; thanks to Marc Culler for patch
Diffstat (limited to 'macosx/tkMacOSXNotify.c')
-rw-r--r-- | macosx/tkMacOSXNotify.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index 1d4c6c5..3fe59bd 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -220,7 +220,7 @@ TkMacOSXEventsSetupProc( if (flags & TCL_WINDOW_EVENTS && ![[NSRunLoop currentRunLoop] currentMode]) { static const Tcl_Time zeroBlockTime = { 0, 0 }; - + NSAutoreleasePool *pool = [NSAutoreleasePool new]; /* Call this with dequeue=NO -- just checking if the queue is empty. */ NSEvent *currentEvent = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] @@ -229,6 +229,7 @@ TkMacOSXEventsSetupProc( if (currentEvent && currentEvent.type > 0) { Tcl_SetMaxBlockTime(&zeroBlockTime); } + [pool drain]; } } |