[gnome-builder] file: add egg counter for instances



commit 4f83317f043cf6be69e786040c41731d6fe81583
Author: Christian Hergert <chergert redhat com>
Date:   Wed May 11 20:28:04 2016 +0300

    file: add egg counter for instances

 libide/ide-file.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-file.c b/libide/ide-file.c
index a913c15..fbaf4e4 100644
--- a/libide/ide-file.c
+++ b/libide/ide-file.c
@@ -21,6 +21,8 @@
 #include <glib/gi18n.h>
 #include <gtksourceview/gtksource.h>
 
+#include "egg-counter.h"
+
 #include "ide-context.h"
 #include "ide-debug.h"
 #include "ide-file.h"
@@ -50,6 +52,8 @@ enum {
   LAST_PROP
 };
 
+EGG_DEFINE_COUNTER (instances, "IdeFile", "Instances", "Number of IdeFile instances.")
+
 G_DEFINE_TYPE (IdeFile, ide_file, IDE_TYPE_OBJECT)
 
 static GParamSpec *properties [LAST_PROP];
@@ -394,6 +398,8 @@ ide_file_finalize (GObject *object)
 
   G_OBJECT_CLASS (ide_file_parent_class)->finalize (object);
 
+  EGG_COUNTER_DEC (instances);
+
   IDE_EXIT;
 }
 
@@ -513,6 +519,7 @@ ide_file_class_init (IdeFileClass *klass)
 static void
 ide_file_init (IdeFile *file)
 {
+  EGG_COUNTER_INC (instances);
 }
 
 static gboolean


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