Plug some memory leaks

Make sure the scroll controllers in GtkComboBox and GtkScrolledWindow
get destroyed.
This commit is contained in:
Timm Bäder 2017-09-28 20:00:24 +02:00
parent 29dd0a940e
commit 29a4f0ce1f
2 changed files with 4 additions and 0 deletions

View File

@ -2803,6 +2803,8 @@ gtk_combo_box_dispose (GObject* object)
GtkComboBox *combo_box = GTK_COMBO_BOX (object);
GtkComboBoxPrivate *priv = combo_box->priv;
g_clear_object (&priv->scroll_controller);
if (priv->popup_widget)
{
/* Stop menu destruction triggering toggle on a now-invalid button */

View File

@ -2642,6 +2642,8 @@ gtk_scrolled_window_finalize (GObject *object)
g_clear_object (&priv->swipe_gesture);
g_clear_object (&priv->long_press_gesture);
g_clear_object (&priv->pan_gesture);
g_clear_object (&priv->scroll_controller);
G_OBJECT_CLASS (gtk_scrolled_window_parent_class)->finalize (object);
}