mirror of https://github.com/GNOME/gimp.git
app: include the config objects in the instance debugging
And indeed, we fail to get rid of them upon exit...
This commit is contained in:
parent
ed630a1852
commit
990c49b359
|
@ -38,6 +38,8 @@
|
|||
#include "gimprc-blurbs.h"
|
||||
#include "gimpbaseconfig.h"
|
||||
|
||||
#include "gimp-debug.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
|
@ -54,21 +56,50 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_base_config_finalize (GObject *object);
|
||||
static void gimp_base_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_base_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_base_config_class_init (GimpBaseConfigClass *klass);
|
||||
static void gimp_base_config_init (GimpBaseConfig *config,
|
||||
GimpBaseConfigClass *klass);
|
||||
static void gimp_base_config_finalize (GObject *object);
|
||||
static void gimp_base_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_base_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpBaseConfig, gimp_base_config, G_TYPE_OBJECT)
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
#define parent_class gimp_base_config_parent_class
|
||||
|
||||
GType
|
||||
gimp_base_config_get_type (void)
|
||||
{
|
||||
static GType config_type = 0;
|
||||
|
||||
if (! config_type)
|
||||
{
|
||||
const GTypeInfo config_info =
|
||||
{
|
||||
sizeof (GimpBaseConfigClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_base_config_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBaseConfig),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_base_config_init,
|
||||
};
|
||||
|
||||
config_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpBaseConfig",
|
||||
&config_info, 0);
|
||||
}
|
||||
|
||||
return config_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_base_config_class_init (GimpBaseConfigClass *klass)
|
||||
|
@ -76,6 +107,8 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
gint num_processors;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_base_config_finalize;
|
||||
object_class->set_property = gimp_base_config_set_property;
|
||||
object_class->get_property = gimp_base_config_get_property;
|
||||
|
@ -120,8 +153,10 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_base_config_init (GimpBaseConfig *config)
|
||||
gimp_base_config_init (GimpBaseConfig *config,
|
||||
GimpBaseConfigClass *klass)
|
||||
{
|
||||
gimp_debug_add_instance (G_OBJECT (config), G_OBJECT_CLASS (klass));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -132,6 +167,8 @@ gimp_base_config_finalize (GObject *object)
|
|||
g_free (base_config->temp_path);
|
||||
g_free (base_config->swap_path);
|
||||
|
||||
gimp_debug_remove_instance (object);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue