summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-03-21 01:30:55 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-03-21 01:30:55 (GMT)
commit2dada458ac1b4e93abc46dc642b17c0278dab630 (patch)
tree62b0a4ce92f230413e71f7eedeef62e116873298 /macosx/tkMacOSXMenu.c
parent6596343ef6a711a8b5a51e17c946f206a90efe16 (diff)
downloadtk-2dada458ac1b4e93abc46dc642b17c0278dab630.zip
tk-2dada458ac1b4e93abc46dc642b17c0278dab630.tar.gz
tk-2dada458ac1b4e93abc46dc642b17c0278dab630.tar.bz2
Improvement of memory management, removal of zombie windows from Tk-Cocoa; thanks to Marc Culler for patch
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r--macosx/tkMacOSXMenu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 0cc874c..ed22640 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -261,6 +261,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
/*Add time for errors to fire if necessary. This is sub-optimal but avoids issues with Tcl/Cocoa event loop integration.*/
Tcl_Sleep(100);
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
Tcl_Preserve(interp);
Tcl_Preserve(menuPtr);
@@ -273,6 +274,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
}
Tcl_Release(menuPtr);
Tcl_Release(interp);
+ [pool drain];
}
}
}