Andy, I think this is your area. Could you look at this?
Popping up menu items on the menubar creates many memory leaks like this:
* This memory was allocated from:
malloc [rtlib.o]
xmalloc [alloc.c:280]
xstrdup [alloc.c:376]
button_item_to_widget_value [gui-x.c:343]
menu_item_descriptor_to_widget_value_1 [menubar-x.c:137]
menu_item_descriptor_to_widget_value_1 [menubar-x.c:304]
menu_item_descriptor_to_widget_value_1 [menubar-x.c:304]
menu_item_descriptor_to_widget_value_1 [menubar-x.c:304]
menu_item_descriptor_to_widget_value [menubar-x.c:352]
compute_menubar_data [menubar-x.c:528]
set_frame_menubar [menubar-x.c:571]
x_initialize_frame_menubar [menubar-x.c:631]
x_create_widgets [frame-x.c:1989]
x_init_frame_1 [frame-x.c:2176]
Fmake_frame [frame.c:389]
Ffuncall [eval.c:3178]
execute_optimized_program [bytecode.c:743]
funcall_compiled_function [bytecode.c:519]
Ffuncall [eval.c:3210]
execute_optimized_program [bytecode.c:743]
funcall_compiled_function [bytecode.c:519]
Ffuncall [eval.c:3210]
execute_optimized_program [bytecode.c:743]
funcall_compiled_function [bytecode.c:519]
Feval [eval.c:3034]
condition_case_1 [eval.c:1630]
top_level_1 [cmdloop.c:202]
internal_catch [eval.c:1305]
initial_command_loop [cmdloop.c:281]
xemacs_21_2_b23_sparc_sun_solaris2_6 [emacs.c:1898]
main [emacs.c:2323]
_start [crt1.o]