[telepathy-gabble/telepathy-gabble-0.8] free debugger singleton on exit
Dafydd Harries
dafydd.harries at collabora.co.uk
Thu Jan 7 17:20:00 PST 2010
---
src/connection-manager.c | 2 ++
src/debugger.c | 10 ++++++++++
src/debugger.h | 3 +++
3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/connection-manager.c b/src/connection-manager.c
index 68cfce4..17003b4 100644
--- a/src/connection-manager.c
+++ b/src/connection-manager.c
@@ -30,6 +30,7 @@
#include "connection.h"
#include "debug.h"
+#include "debugger.h"
G_DEFINE_TYPE(GabbleConnectionManager,
gabble_connection_manager,
@@ -50,6 +51,7 @@ static void
gabble_connection_manager_finalize (GObject *object)
{
gabble_debug_free ();
+ gabble_debugger_free_singleton ();
}
static void
diff --git a/src/debugger.c b/src/debugger.c
index 4ee2ab6..727c7ea 100644
--- a/src/debugger.c
+++ b/src/debugger.c
@@ -244,6 +244,16 @@ gabble_debugger_get_singleton (void)
}
void
+gabble_debugger_free_singleton (void)
+{
+ if (singleton != NULL)
+ {
+ g_object_unref (singleton);
+ singleton = NULL;
+ }
+}
+
+void
gabble_debugger_add_message (GabbleDebugger *self,
GTimeVal *timestamp,
const gchar *domain,
diff --git a/src/debugger.h b/src/debugger.h
index a6d41cf..e1ee9dd 100644
--- a/src/debugger.h
+++ b/src/debugger.h
@@ -77,6 +77,9 @@ GabbleDebugger *
gabble_debugger_get_singleton (void);
void
+gabble_debugger_free_singleton (void);
+
+void
gabble_debugger_add_message (GabbleDebugger *self,
GTimeVal *timestamp,
const gchar *domain,
--
1.5.6.5
More information about the telepathy-commits
mailing list