This is the first time I use GTK. I have the following code, and I am wondering a memory leak. It is inside a function that is called every time a right-click occurs.
GtkWidget *menu = gtk_menu_new();
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
gtk_widget_show_all(menu);
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 3, event->button.time);
Is cleanup processed automatically by GTK?
source
share