[libpeas] Print a debug message when a plugin loader is finalized



commit 954fe54d4f704f6ba5d18507a4cf2d111806ec4b
Author: Garrett Regier <garrettregier gmail com>
Date:   Tue Nov 12 22:45:48 2013 -0800

    Print a debug message when a plugin loader is finalized
    
    It is useful to know that they are actually being freed.

 libpeas/peas-plugin-loader.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libpeas/peas-plugin-loader.c b/libpeas/peas-plugin-loader.c
index ef57173..bcb47d0 100644
--- a/libpeas/peas-plugin-loader.c
+++ b/libpeas/peas-plugin-loader.c
@@ -28,6 +28,12 @@
 G_DEFINE_ABSTRACT_TYPE (PeasPluginLoader, peas_plugin_loader, G_TYPE_OBJECT);
 
 static void
+peas_plugin_loader_finalize (GObject *object)
+{
+  g_debug ("Plugin Loader '%s' Finalized", G_OBJECT_TYPE_NAME (object));
+}
+
+static void
 peas_plugin_loader_init (PeasPluginLoader *loader)
 {
 }
@@ -35,6 +41,9 @@ peas_plugin_loader_init (PeasPluginLoader *loader)
 static void
 peas_plugin_loader_class_init (PeasPluginLoaderClass *klass)
 {
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = peas_plugin_loader_finalize;
 }
 
 gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]