diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2011-11-16 15:59:04 +0100 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2011-11-16 15:59:04 +0100 |
commit | 9ec9fd41456f199d95d05a0d29f040a169039d24 (patch) | |
tree | ff83ef1c93fc2b9c346859c4ae627540b087a84d /rakia/media-manager.c | |
parent | 3785f4686c084558b0b693c7d625088efe432d73 (diff) |
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 'rakia/media-manager.c')
-rw-r--r-- | rakia/media-manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rakia/media-manager.c b/rakia/media-manager.c index 92fb738..a630926 100644 --- a/rakia/media-manager.c +++ b/rakia/media-manager.c @@ -225,7 +225,7 @@ rakia_media_manager_close_all (RakiaMediaManager *fac) g_object_unref (chan); } - g_ptr_array_free (channels, TRUE); + g_ptr_array_unref (channels); } } @@ -487,7 +487,7 @@ rakia_media_manager_type_foreach_channel_class (GType type, g_value_set_uint (handle_type_value, TP_HANDLE_TYPE_CONTACT); func (type, table, named_channel_allowed_properties, user_data); - g_hash_table_destroy (table); + g_hash_table_unref (table); } typedef enum |