region: Fix a couple of memory leaks
Unref the GSettings object and build the GnomeXkbInfo only once. There's no need to free and keep rebuilding the latter since it doesn't keep any state and is a bit expensive to build. https://bugzilla.gnome.org/show_bug.cgi?id=662489
This commit is contained in:
parent
03f08fd36c
commit
49f7d379bc
1 changed files with 4 additions and 1 deletions
|
@ -870,6 +870,9 @@ setup_input_tabs (GtkBuilder *builder,
|
|||
GtkTreeSelection *selection;
|
||||
|
||||
input_sources_settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
|
||||
g_object_weak_ref (G_OBJECT (builder), (GWeakNotify) g_object_unref, input_sources_settings);
|
||||
|
||||
if (!xkb_info)
|
||||
xkb_info = gnome_xkb_info_new ();
|
||||
|
||||
#ifdef HAVE_IBUS
|
||||
|
|
Loading…
Add table
Reference in a new issue