Don't leak the adjustments. (#148089, Tommi Komulainen)

Wed Jul 21 21:26:08 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkviewport.c (viewport_set_adjustment): Don't leak
	the adjustments.  (#148089, Tommi Komulainen)
This commit is contained in:
Matthias Clasen 2004-07-22 01:28:33 +00:00 committed by Matthias Clasen
parent 0ca18d150f
commit 7f3499c3a7
5 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Wed Jul 21 21:26:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkviewport.c (viewport_set_adjustment): Don't leak
the adjustments. (#148089, Tommi Komulainen)
Wed Jul 21 21:20:21 2004 Matthias Clasen <maclas@gmx.de> Wed Jul 21 21:20:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak

View File

@ -1,3 +1,8 @@
Wed Jul 21 21:26:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkviewport.c (viewport_set_adjustment): Don't leak
the adjustments. (#148089, Tommi Komulainen)
Wed Jul 21 21:20:21 2004 Matthias Clasen <maclas@gmx.de> Wed Jul 21 21:20:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak

View File

@ -1,3 +1,8 @@
Wed Jul 21 21:26:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkviewport.c (viewport_set_adjustment): Don't leak
the adjustments. (#148089, Tommi Komulainen)
Wed Jul 21 21:20:21 2004 Matthias Clasen <maclas@gmx.de> Wed Jul 21 21:20:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak

View File

@ -1,3 +1,8 @@
Wed Jul 21 21:26:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkviewport.c (viewport_set_adjustment): Don't leak
the adjustments. (#148089, Tommi Komulainen)
Wed Jul 21 21:20:21 2004 Matthias Clasen <maclas@gmx.de> Wed Jul 21 21:20:21 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak

View File

@ -462,7 +462,8 @@ viewport_set_adjustment (GtkViewport *viewport,
if (!adjustment) if (!adjustment)
adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0,
0.0, 0.0, 0.0)); 0.0, 0.0, 0.0));
if (*adjustmentp)
g_object_unref (*adjustmentp);
*adjustmentp = adjustment; *adjustmentp = adjustment;
g_object_ref (adjustment); g_object_ref (adjustment);
gtk_object_sink (GTK_OBJECT (adjustment)); gtk_object_sink (GTK_OBJECT (adjustment));