summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
diff options
context:
space:
mode:
authordas <das>2009-02-06 08:12:06 (GMT)
committerdas <das>2009-02-06 08:12:06 (GMT)
commit327bb5e5b38a43360055bf1c02bcd38d33526973 (patch)
tree575c6e052e7d2d83bbdced2270820a4e834455eb /generic/tkMenu.c
parent51567b88ece4e730020fd53b4b200468c8a7b4c7 (diff)
downloadtk-327bb5e5b38a43360055bf1c02bcd38d33526973.zip
tk-327bb5e5b38a43360055bf1c02bcd38d33526973.tar.gz
tk-327bb5e5b38a43360055bf1c02bcd38d33526973.tar.bz2
* generic/tkImgPhInstance.c: fix numerous leaks discovered with the
* generic/tkMenu.c: Mac OS X Instruments.app Leaks tool. * generic/tkText.c: * generic/tkTextImage.c: * generic/tkTextIndex.c: * generic/tkUndo.c: * generic/tkUtil.c: * generic/ttk/ttkFrame.c: * macosx/tkMacOSXWm.c:
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r--generic/tkMenu.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 3d2aa39..fa2959f 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenu.c,v 1.49 2009/01/14 22:48:10 nijtmans Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.50 2009/02/06 08:12:07 das Exp $
*/
/*
@@ -393,6 +393,13 @@ static Tk_ClassProcs menuClass = {
*--------------------------------------------------------------
*/
+static void
+FreeOptionTables(
+ ClientData clientData)
+{
+ ckfree(clientData);
+}
+
int
TkCreateMenuCmd(
Tcl_Interp *interp) /* Interpreter we are creating the command
@@ -416,7 +423,8 @@ TkCreateMenuCmd(
optionTablesPtr->entryOptionTables[CHECK_BUTTON_ENTRY] =
Tk_CreateOptionTable(interp, specsArray[CHECK_BUTTON_ENTRY]);
- Tcl_CreateObjCommand(interp, "menu", MenuCmd, optionTablesPtr, NULL);
+ Tcl_CreateObjCommand(interp, "menu", MenuCmd, optionTablesPtr,
+ FreeOptionTables);
if (Tcl_IsSafe(interp)) {
Tcl_HideCommand(interp, "menu", "menu");