From d7eabeeabfcbb8922d5166c4bde328f334e25a04 Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Sat, 21 Mar 2015 03:22:06 +0000 Subject: Final cleanup of zombie windows in Cocoa --- macosx/tkMacOSXWm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 5cec236..82de883 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -807,6 +807,7 @@ TkWmDeadWindow( NSWindow *window = wmPtr->window; if (window && !Tk_IsEmbedded(winPtr) ) { + NSAutoreleasePool *pool = [NSAutoreleasePool new]; NSWindow *parent = [window parentWindow]; if (parent) { [parent removeChildWindow:window]; @@ -826,6 +827,7 @@ TkWmDeadWindow( [front makeKeyAndOrderFront:NSApp]; } } + [pool drain]; } ckfree(wmPtr); winPtr->wmInfoPtr = NULL; -- cgit v0.12