[devhelp] Book: free instance variables in the same order as in the struct
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] Book: free instance variables in the same order as in the struct
- Date: Sun, 10 Dec 2017 09:42:41 +0000 (UTC)
commit 7e152214dc53e72d7ca7803d659568fb581916df
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Dec 10 10:32:59 2017 +0100
Book: free instance variables in the same order as in the struct
It's easier to check that everything is freed.
src/dh-book.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/dh-book.c b/src/dh-book.c
index ca60b9e..55616ab 100644
--- a/src/dh-book.c
+++ b/src/dh-book.c
@@ -111,12 +111,12 @@ dh_book_finalize (GObject *object)
priv = dh_book_get_instance_private (DH_BOOK (object));
g_clear_object (&priv->index_file);
+ g_free (priv->id);
+ g_free (priv->title);
+ g_free (priv->language);
_dh_util_free_book_tree (priv->tree);
g_list_free_full (priv->links, (GDestroyNotify)dh_link_unref);
g_list_free_full (priv->completions, g_free);
- g_free (priv->language);
- g_free (priv->title);
- g_free (priv->id);
G_OBJECT_CLASS (dh_book_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]