aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-individual-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-11-16 22:31:29 +0800
committerXavier Claessens <xclaesse@gmail.com>2011-11-16 22:57:00 +0800
commit5bb2c1c62a06e682ab48d530cae5f9614a90a75e (patch)
treea847e5c1980d69126b8d7974808cb70923becb33 /libempathy/empathy-individual-manager.c
parentba6e07cc5a0bf75118c12fd5ebf05e4453a5dc80 (diff)
downloadgsoc2013-empathy-5bb2c1c62a06e682ab48d530cae5f9614a90a75e.tar
gsoc2013-empathy-5bb2c1c62a06e682ab48d530cae5f9614a90a75e.tar.gz
gsoc2013-empathy-5bb2c1c62a06e682ab48d530cae5f9614a90a75e.tar.bz2
gsoc2013-empathy-5bb2c1c62a06e682ab48d530cae5f9614a90a75e.tar.lz
gsoc2013-empathy-5bb2c1c62a06e682ab48d530cae5f9614a90a75e.tar.xz
gsoc2013-empathy-5bb2c1c62a06e682ab48d530cae5f9614a90a75e.tar.zst
gsoc2013-empathy-5bb2c1c62a06e682ab48d530cae5f9614a90a75e.zip
Use _unref instead of _free _destroy when possible.unref
Replace g_(ptr_)array_free (foo, TRUE) and g_hash_table_destroy with respectively g_(ptr_)array_unref (foo) and g_hash_table_unref. I used this command to generate this patch: for f in `find -name "*.c"`; do sed -i $f -re 's/g_ptr_array_free \(([^ ,]+), TRUE\)/g_ptr_array_unref \(\1\)/'; done See Danielle's blog for explanation of possible bug _free can do: http://blogs.gnome.org/danni/2011/11/16/mistakes-with-g_value_set_boxed/
Diffstat (limited to 'libempathy/empathy-individual-manager.c')
-rw-r--r--libempathy/empathy-individual-manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c
index 044610724..5305c41e8 100644
--- a/libempathy/empathy-individual-manager.c
+++ b/libempathy/empathy-individual-manager.c
@@ -249,7 +249,7 @@ individual_manager_dispose (GObject *object)
{
EmpathyIndividualManagerPriv *priv = GET_PRIV (object);
- g_hash_table_destroy (priv->individuals);
+ g_hash_table_unref (priv->individuals);
g_signal_handlers_disconnect_by_func (priv->aggregator,
aggregator_individuals_changed_cb, object);
@@ -470,7 +470,7 @@ empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self,
priv->aggregator, NULL, persona_store, details,
aggregator_add_persona_from_details_cb, contact);
- g_hash_table_destroy (details);
+ g_hash_table_unref (details);
g_object_unref (persona_store);
finish: