Plug some leaks and expose others.

2004-03-17  Morten Welinder  <terra@gnome.org>

	* tests/testfilechooser.c (main): Plug some leaks and expose
	others.
This commit is contained in:
Morten Welinder 2004-03-17 19:01:00 +00:00 committed by Morten Welinder
parent d38a1574f7
commit 6cacaf3d15
6 changed files with 33 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2004-03-17 Morten Welinder <terra@gnome.org>
* tests/testfilechooser.c (main): Plug some leaks and expose
others.
* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
object. Fixed #136652.

View File

@ -1,5 +1,8 @@
2004-03-17 Morten Welinder <terra@gnome.org>
* tests/testfilechooser.c (main): Plug some leaks and expose
others.
* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
object. Fixed #136652.

View File

@ -1,5 +1,8 @@
2004-03-17 Morten Welinder <terra@gnome.org>
* tests/testfilechooser.c (main): Plug some leaks and expose
others.
* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
object. Fixed #136652.

View File

@ -1,5 +1,8 @@
2004-03-17 Morten Welinder <terra@gnome.org>
* tests/testfilechooser.c (main): Plug some leaks and expose
others.
* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
object. Fixed #136652.

View File

@ -1,5 +1,8 @@
2004-03-17 Morten Welinder <terra@gnome.org>
* tests/testfilechooser.c (main): Plug some leaks and expose
others.
* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
object. Fixed #136652.

View File

@ -368,6 +368,13 @@ set_filename_existing_nonexistent_cb (GtkButton *button,
set_filename (chooser, "/usr/nonexistent");
}
static void
kill_dependent (GtkWindow *win, GtkObject *dep)
{
gtk_object_destroy (dep);
g_object_unref (dep);
}
int
main (int argc, char **argv)
{
@ -531,7 +538,17 @@ main (int argc, char **argv)
gtk_widget_show_all (control_window);
g_object_ref (control_window);
g_signal_connect (G_OBJECT (dialog), "destroy",
G_CALLBACK (kill_dependent), control_window);
/* We need to hold a ref until we have destroyed the widgets, just in case
* someone else destroys them. We explicitly destroy windows to catch leaks.
*/
g_object_ref (dialog);
gtk_main ();
gtk_widget_destroy (dialog);
g_object_unref (dialog);
return 0;
}