emacs-devel
[Top][All Lists]
Advanced

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

Re: Using the ImageMagick backend seems to leak memory


From: Jashy
Subject: Re: Using the ImageMagick backend seems to leak memory
Date: Mon, 10 Jan 2011 05:28:56 -0800 (PST)


Tassilo Horn-5 wrote:
> 
> it seems one must call
>   MagickWandTerminus();
> after destroying the wands.
> Maybe that helps.
> 

Seemly it does not help too much:
diff --git a/src/image.c b/src/image.c
index fd1b921..00f857b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7539,6 +7539,7 @@ imagemagick_load_image (/* Pointer to emacs frame
structure.  */
       image_error ("Invalid image number `%s' in image `%s'",
                   image, img->spec);
       DestroyMagickWand (ping_wand);
+      MagickWandTerminus ();
       return 0;
     }
 
@@ -7549,6 +7550,7 @@ imagemagick_load_image (/* Pointer to emacs frame
structure.  */
                     img->data.lisp_val));
 
   DestroyMagickWand (ping_wand);
+  MagickWandTerminus ();
   /* Now, after pinging, we know how many images are inside the
      file. If its not a bundle, just one.  */
 
@@ -7806,10 +7808,12 @@ imagemagick_load_image (/* Pointer to emacs frame
structure.  */
   /* Final cleanup. image_wand should be the only resource left. */
   DestroyMagickWand (image_wand);
 
+  MagickWandTerminus ();
   return 1;
 
  imagemagick_error:
   DestroyMagickWand (image_wand);
+  MagickWandTerminus ();
   /* TODO more cleanup.  */
   image_error ("Error parsing IMAGEMAGICK image `%s'", img->spec, Qnil);
   return 0;


-- 
View this message in context: 
http://old.nabble.com/Using-the-ImageMagick-backend-seems-to-leak-memory-tp30603180p30633674.html
Sent from the Emacs - Dev mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]