diff options
author | Ted Gould <ted@canonical.com> | 2009-05-12 11:55:15 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-05-12 11:55:15 -0500 |
commit | 0dccfbb4232b7711fb9c5b0f79e8e8f6d062217a (patch) | |
tree | 085c9478b5ab90ad8f8cbf7351eb0934d445034a /libdbusmenu-glib | |
parent | 4c45cd76dbfa6dbb2904bc2a681eb759fddcd40a (diff) | |
download | libdbusmenu-0dccfbb4232b7711fb9c5b0f79e8e8f6d062217a.tar.gz libdbusmenu-0dccfbb4232b7711fb9c5b0f79e8e8f6d062217a.tar.bz2 libdbusmenu-0dccfbb4232b7711fb9c5b0f79e8e8f6d062217a.zip |
Creating and destroying the properties.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/menuitem.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 742fc93..0641932 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -101,6 +101,8 @@ dbusmenu_menuitem_init (DbusmenuMenuitem *self) priv->id = 0; priv->children = NULL; + + priv->properties = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); return; } @@ -116,6 +118,12 @@ dbusmenu_menuitem_dispose (GObject *object) static void dbusmenu_menuitem_finalize (GObject *object) { + DbusmenuMenuitemPrivate * priv = DBUSMENU_MENUITEM_GET_PRIVATE(object); + + if (priv->properties != NULL) { + g_hash_table_destroy(priv->properties); + priv->properties = NULL; + } G_OBJECT_CLASS (dbusmenu_menuitem_parent_class)->finalize (object); return; |