We shall unref in dispose() and free in finalize(), not vice versa.

* app/core/gimp.c: We shall unref in dispose() and free in
finalize(), not vice versa.

svn path=/trunk/; revision=27787
This commit is contained in:
Martin Nordholts 2008-12-13 17:27:50 +00:00
parent 364d2cd84f
commit fbb4a7c9ec
2 changed files with 28 additions and 23 deletions

View File

@ -1,3 +1,8 @@
2008-12-13 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimp.c: We shall unref in dispose() and free in
finalize(), not vice versa.
2008-12-13 Martin Nordholts <martinn@svn.gnome.org>
Bug 555954 Merge Tagging of Gimp Resources GSoC Project

View File

@ -269,29 +269,6 @@ gimp_dispose (GObject *object)
{
Gimp *gimp = GIMP (object);
if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC);
if (gimp->brush_factory)
gimp_data_factory_data_free (gimp->brush_factory);
if (gimp->pattern_factory)
gimp_data_factory_data_free (gimp->pattern_factory);
if (gimp->gradient_factory)
gimp_data_factory_data_free (gimp->gradient_factory);
if (gimp->palette_factory)
gimp_data_factory_data_free (gimp->palette_factory);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
gimp_finalize (GObject *object)
{
Gimp *gimp = GIMP (object);
if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC);
@ -432,6 +409,29 @@ gimp_finalize (GObject *object)
gimp->context_list = NULL;
}
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
gimp_finalize (GObject *object)
{
Gimp *gimp = GIMP (object);
if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC);
if (gimp->brush_factory)
gimp_data_factory_data_free (gimp->brush_factory);
if (gimp->pattern_factory)
gimp_data_factory_data_free (gimp->pattern_factory);
if (gimp->gradient_factory)
gimp_data_factory_data_free (gimp->gradient_factory);
if (gimp->palette_factory)
gimp_data_factory_data_free (gimp->palette_factory);
gimp_units_exit (gimp);
G_OBJECT_CLASS (parent_class)->finalize (object);