[sound-juicer/wip/non-recursive-make: 5/15] prefs: Don't leak combobox model
- From: Phillip Wood <pwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer/wip/non-recursive-make: 5/15] prefs: Don't leak combobox model
- Date: Fri, 20 Feb 2015 11:30:48 +0000 (UTC)
commit b907391c84cb4547c2dfeeb4a7a5b6c66113b1c8
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Fri Jan 9 18:58:35 2015 +0000
prefs: Don't leak combobox model
GtkComboBox takes it's own reference to the model so we need to free
ours.
src/sj-prefs.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/sj-prefs.c b/src/sj-prefs.c
index 7075137..396411c 100644
--- a/src/sj-prefs.c
+++ b/src/sj-prefs.c
@@ -336,6 +336,7 @@ static void populate_pattern_combo (GtkComboBox *combo, const FilePattern *patte
gtk_list_store_set (store, &iter, 0, _(patterns[i].name), 1, patterns[i].pattern, -1);
}
gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store));
+ g_object_unref (store);
}
static void
@@ -374,6 +375,7 @@ static void populate_profile_combo (GtkComboBox *combo)
}
gtk_combo_box_set_model (GTK_COMBO_BOX (combo), model);
+ g_object_unref (model);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]