app: run dispose manually on the dialog factory before unrefing it

Because some of the dialogs the factory creates add a reference to
it, creating a cycle; so simply unrefing it doesn't do anything.
This commit is contained in:
Michael Natterer 2010-06-24 12:51:46 +02:00
parent 403908829a
commit e7b16c8634
1 changed files with 5 additions and 0 deletions

View File

@ -421,6 +421,11 @@ dialogs_exit (Gimp *gimp)
if (gimp_dialog_factory_get_singleton ())
{
/* run dispose manually so the factory destroys its dialogs, which
* might in turn directly or indirectly ref the factory
*/
g_object_run_dispose (G_OBJECT (gimp_dialog_factory_get_singleton ()));
g_object_unref (gimp_dialog_factory_get_singleton ());
gimp_dialog_factory_set_singleton (NULL);
}