summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-03-21 03:21:25 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-03-21 03:21:25 (GMT)
commit78fdb8a758d9a6a2fd31d8bb222186e26dc338cc (patch)
tree0256db3818367f8986b6872a5feae4c23cbf1f4f /macosx
parent65407b9a99817de6b8ccf97f8397604a4904139c (diff)
downloadtk-78fdb8a758d9a6a2fd31d8bb222186e26dc338cc.zip
tk-78fdb8a758d9a6a2fd31d8bb222186e26dc338cc.tar.gz
tk-78fdb8a758d9a6a2fd31d8bb222186e26dc338cc.tar.bz2
Final cleanup of zombie windows in Cocoa
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXEvent.c9
-rw-r--r--macosx/tkMacOSXWm.c2
2 files changed, 5 insertions, 6 deletions
diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c
index 365dc9b..db13249 100644
--- a/macosx/tkMacOSXEvent.c
+++ b/macosx/tkMacOSXEvent.c
@@ -133,13 +133,10 @@ TkMacOSXFlushWindows(void)
*/
NSAutoreleasePool *pool = [NSAutoreleasePool new];
NSArray *macWindows = [NSApp orderedWindows];
- NSInteger windowCount = [macWindows count];
- if(windowCount) {
- for (NSWindow *w in macWindows) {
- if (TkMacOSXGetXWindow(w)) {
- [w flushWindow];
- }
+ for (NSWindow *w in macWindows) {
+ if (TkMacOSXGetXWindow(w)) {
+ [w flushWindow];
}
}
[pool drain];
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 8866118..417f130 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -790,6 +790,7 @@ TkWmDeadWindow(
NSWindow *window = wmPtr->window;
if (window && !Tk_IsEmbedded(winPtr) ) {
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
NSWindow *parent = [window parentWindow];
if (parent) {
[parent removeChildWindow:window];
@@ -809,6 +810,7 @@ TkWmDeadWindow(
[front makeKeyAndOrderFront:NSApp];
}
}
+ [pool drain];
}
ckfree(wmPtr);
winPtr->wmInfoPtr = NULL;