[gthumb] use g_ptr_array_unref instead of g_ptr_array_free



commit d1f7327bd54d77854a1962cb707d8d2d20f45e28
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Nov 12 16:36:49 2019 +0100

    use g_ptr_array_unref instead of g_ptr_array_free

 extensions/change_date/gth-change-date-task.c | 2 +-
 extensions/comments/gth-comment.c             | 4 ++--
 gthumb/dlg-preferences-shortcuts.c            | 2 +-
 gthumb/gth-color-manager.c                    | 2 +-
 gthumb/gth-main.c                             | 6 +++---
 gthumb/gth-window.c                           | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/extensions/change_date/gth-change-date-task.c b/extensions/change_date/gth-change-date-task.c
index 88ec3ba8..d97b48ae 100644
--- a/extensions/change_date/gth-change-date-task.c
+++ b/extensions/change_date/gth-change-date-task.c
@@ -320,7 +320,7 @@ info_ready_cb (GList    *files,
        else
                update_modification_time (self);
 
-       g_ptr_array_free (attribute_v, TRUE);
+       g_ptr_array_unref (attribute_v);
        gth_datetime_free (date_time);
 }
 
diff --git a/extensions/comments/gth-comment.c b/extensions/comments/gth-comment.c
index dc102c97..8b8990f3 100644
--- a/extensions/comments/gth-comment.c
+++ b/extensions/comments/gth-comment.c
@@ -82,7 +82,7 @@ gth_comment_finalize (GObject *obj)
 
        gth_comment_free_data (self);
        gth_comment_clear_categories (self);
-       g_ptr_array_free (self->priv->categories, TRUE);
+       g_ptr_array_unref (self->priv->categories);
        g_date_free (self->priv->date);
        gth_time_free (self->priv->time_of_day);
 
@@ -425,7 +425,7 @@ void
 gth_comment_clear_categories (GthComment *self)
 {
        g_ptr_array_foreach (self->priv->categories, (GFunc) g_free, NULL);
-       g_ptr_array_free (self->priv->categories, TRUE);
+       g_ptr_array_unref (self->priv->categories);
        self->priv->categories = g_ptr_array_new ();
 }
 
diff --git a/gthumb/dlg-preferences-shortcuts.c b/gthumb/dlg-preferences-shortcuts.c
index 84b15bc1..e495896c 100644
--- a/gthumb/dlg-preferences-shortcuts.c
+++ b/gthumb/dlg-preferences-shortcuts.c
@@ -53,7 +53,7 @@ typedef struct {
 static void
 browser_data_free (BrowserData *data)
 {
-       g_ptr_array_free (data->rows, FALSE);
+       g_ptr_array_unref (data->rows);
        g_object_unref (data->builder);
        g_free (data);
 }
diff --git a/gthumb/gth-color-manager.c b/gthumb/gth-color-manager.c
index efe48151..e6146662 100644
--- a/gthumb/gth-color-manager.c
+++ b/gthumb/gth-color-manager.c
@@ -288,7 +288,7 @@ find_device_by_kind_cb (GObject      *source_object,
                           cd_device_connected_cb,
                           task);
 
-       g_ptr_array_free (devices, TRUE);
+       g_ptr_array_unref (devices);
 }
 
 
diff --git a/gthumb/gth-main.c b/gthumb/gth-main.c
index 72dc9afa..d06dae0a 100644
--- a/gthumb/gth-main.c
+++ b/gthumb/gth-main.c
@@ -134,8 +134,8 @@ gth_main_finalize (GObject *object)
        _g_object_list_unref (gth_main->priv->file_sources);
 
        g_hash_table_unref (gth_main->priv->metadata_info_hash);
-       g_ptr_array_free (gth_main->priv->metadata_category, TRUE);
-       g_ptr_array_free (gth_main->priv->metadata_info, TRUE);
+       g_ptr_array_unref (gth_main->priv->metadata_category);
+       g_ptr_array_unref (gth_main->priv->metadata_info);
        g_list_foreach (gth_main->priv->metadata_provider, (GFunc) g_object_unref, NULL);
        g_list_free (gth_main->priv->metadata_provider);
 
@@ -985,7 +985,7 @@ gth_main_get_type_set (const char *set_name)
 static void
 g_ptr_array_destroy (gpointer array)
 {
-       g_ptr_array_free ((GPtrArray *) array, TRUE);
+       g_ptr_array_unref ((GPtrArray *) array);
 }
 
 
diff --git a/gthumb/gth-window.c b/gthumb/gth-window.c
index 9ea418ec..c5ecf242 100644
--- a/gthumb/gth-window.c
+++ b/gthumb/gth-window.c
@@ -253,7 +253,7 @@ gth_window_finalize (GObject *object)
        g_object_unref (window->priv->window_group);
        g_object_unref (window->priv->accel_group);
        g_hash_table_unref (window->priv->shortcuts);
-       g_ptr_array_free (window->priv->shortcuts_v, TRUE);
+       g_ptr_array_unref (window->priv->shortcuts_v);
 
        G_OBJECT_CLASS (gth_window_parent_class)->finalize (object);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]