From 4363d4c0d778b924b12f294636ca108a15d93aec Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 16 Dec 2010 10:48:52 +0100 Subject: ft-factory: don't leak the handler --- libempathy/empathy-ft-factory.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libempathy/empathy-ft-factory.c b/libempathy/empathy-ft-factory.c index 3443112a3..398474719 100644 --- a/libempathy/empathy-ft-factory.c +++ b/libempathy/empathy-ft-factory.c @@ -88,6 +88,17 @@ do_constructor (GType type, return retval; } +static void +empathy_ft_factory_dispose (GObject *object) +{ + EmpathyFTFactory *self = (EmpathyFTFactory *) object; + EmpathyFTFactoryPriv *priv = GET_PRIV (self); + + tp_clear_object (&priv->handler); + + (G_OBJECT_CLASS (empathy_ft_factory_parent_class)->dispose) (object); +} + static void empathy_ft_factory_class_init (EmpathyFTFactoryClass *klass) { @@ -96,6 +107,7 @@ empathy_ft_factory_class_init (EmpathyFTFactoryClass *klass) g_type_class_add_private (klass, sizeof (EmpathyFTFactoryPriv)); object_class->constructor = do_constructor; + object_class->dispose = empathy_ft_factory_dispose; /** * EmpathyFTFactory::new-ft-handler -- cgit v1.2.3