[gnome-builder] file-settings: add some counters



commit eefb86bc6255bb71500f4d4386a8e67acd9fa40d
Author: Christian Hergert <chergert redhat com>
Date:   Wed May 11 19:23:36 2016 +0300

    file-settings: add some counters

 libide/ide-file-settings.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-file-settings.c b/libide/ide-file-settings.c
index 0537ab0..d0929c6 100644
--- a/libide/ide-file-settings.c
+++ b/libide/ide-file-settings.c
@@ -21,6 +21,8 @@
 #include <glib/gi18n.h>
 #include <gtksourceview/gtksource.h>
 
+#include "egg-counter.h"
+
 #include "ide-enums.h"
 #include "ide-file.h"
 #include "ide-file-settings.h"
@@ -36,6 +38,8 @@
  * We do that over and over again until we have all the aspects of the object defined.
  */
 
+EGG_DEFINE_COUNTER (instances, "IdeFileSettings", "Instances", "Number of IdeFileSettings instances.")
+
 typedef struct
 {
   GPtrArray *children;
@@ -204,6 +208,8 @@ ide_file_settings_finalize (GObject *object)
   ide_clear_weak_pointer (&priv->file);
 
   G_OBJECT_CLASS (ide_file_settings_parent_class)->finalize (object);
+
+  EGG_COUNTER_DEC (instances);
 }
 
 static void
@@ -322,6 +328,8 @@ ide_file_settings_init (IdeFileSettings *self)
 {
   IdeFileSettingsPrivate *priv = ide_file_settings_get_instance_private (self);
 
+  EGG_COUNTER_INC (instances);
+
   priv->indent_style = IDE_INDENT_STYLE_SPACES;
   priv->indent_width = -1;
   priv->insert_trailing_newline = TRUE;


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