aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-09 11:53:00 -0600
committerTed Gould <ted@gould.cx>2010-02-09 11:53:00 -0600
commit89fb85dd78c224893ff80498fdf9a57210604a79 (patch)
treeee0d723a45c597f1b318cddc8e96444b816683f1
parentc6e66acdc7ae9cebbe3592905206760f7b168694 (diff)
downloadlibdbusmenu-89fb85dd78c224893ff80498fdf9a57210604a79.tar.gz
libdbusmenu-89fb85dd78c224893ff80498fdf9a57210604a79.tar.bz2
libdbusmenu-89fb85dd78c224893ff80498fdf9a57210604a79.zip
Lifecycle for the menuitem
-rw-r--r--libdbusmenu-glib/menuitem-proxy.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libdbusmenu-glib/menuitem-proxy.c b/libdbusmenu-glib/menuitem-proxy.c
index 98788c6..836056e 100644
--- a/libdbusmenu-glib/menuitem-proxy.c
+++ b/libdbusmenu-glib/menuitem-proxy.c
@@ -68,18 +68,29 @@ dbusmenu_menuitem_proxy_class_init (DbusmenuMenuitemProxyClass *klass)
static void
dbusmenu_menuitem_proxy_init (DbusmenuMenuitemProxy *self)
{
+ DbusmenuMenuitemProxyPrivate * priv = DBUSMENU_MENUITEM_PROXY_GET_PRIVATE(self);
+
+ priv->mi = NULL;
return;
}
+/* Remove references to objects */
static void
dbusmenu_menuitem_proxy_dispose (GObject *object)
{
+ DbusmenuMenuitemProxyPrivate * priv = DBUSMENU_MENUITEM_PROXY_GET_PRIVATE(object);
+
+ if (priv->mi != NULL) {
+ g_object_unref(G_OBJECT(priv->mi));
+ priv->mi = NULL;
+ }
G_OBJECT_CLASS (dbusmenu_menuitem_proxy_parent_class)->dispose (object);
return;
}
+/* Free any memory that we've allocated */
static void
dbusmenu_menuitem_proxy_finalize (GObject *object)
{