[gimp] Bug 757772 - Filters->Animation->Blend... leaks GeglBuffers and contexts...



commit 76908b494b5049c41093a9931c435d4b24d7d205
Author: Michael Natterer <mitch gimp org>
Date:   Sun Nov 8 19:18:36 2015 +0100

    Bug 757772 - Filters->Animation->Blend... leaks GeglBuffers and contexts...
    
    if invoked on a single layer image
    
    In gimp_real_exit(), unref all stale images (which do not have a
    display).

 app/core/gimp.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimp.c b/app/core/gimp.c
index 7571f69..4cc2f2f 100644
--- a/app/core/gimp.c
+++ b/app/core/gimp.c
@@ -793,9 +793,19 @@ static gboolean
 gimp_real_exit (Gimp     *gimp,
                 gboolean  force)
 {
+  GList *image_iter;
+
   if (gimp->be_verbose)
     g_print ("EXIT: %s\n", G_STRFUNC);
 
+  /* get rid of images without display */
+  while ((image_iter = gimp_get_image_iter (gimp)))
+    {
+      GimpImage *image = image_iter->data;
+
+      g_object_unref (image);
+    }
+
   gimp_plug_in_manager_exit (gimp->plug_in_manager);
   gimp_modules_unload (gimp);
 


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