From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jashy Newsgroups: gmane.emacs.devel Subject: Re: Using the ImageMagick backend seems to leak memory Date: Mon, 10 Jan 2011 05:28:56 -0800 (PST) Message-ID: <30633674.post@talk.nabble.com> References: <87sjx6zczl.fsf@member.fsf.org> <30611405.post@talk.nabble.com> <874o9l86eb.fsf@member.fsf.org> <87ipxx2gjl.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294666157 23423 80.91.229.12 (10 Jan 2011 13:29:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 10 Jan 2011 13:29:17 +0000 (UTC) To: Emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 10 14:29:13 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PcHo8-0007OC-Va for ged-emacs-devel@m.gmane.org; Mon, 10 Jan 2011 14:29:13 +0100 Original-Received: from localhost ([127.0.0.1]:57787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcHo8-00020M-C2 for ged-emacs-devel@m.gmane.org; Mon, 10 Jan 2011 08:29:12 -0500 Original-Received: from [140.186.70.92] (port=59230 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcHo0-0001zb-Oc for Emacs-devel@gnu.org; Mon, 10 Jan 2011 08:29:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcHnz-0001qH-M6 for Emacs-devel@gnu.org; Mon, 10 Jan 2011 08:29:04 -0500 Original-Received: from sam.nabble.com ([216.139.236.26]:57898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcHnz-0001oi-Ik for Emacs-devel@gnu.org; Mon, 10 Jan 2011 08:29:03 -0500 Original-Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1PcHns-0006OT-Or for Emacs-devel@gnu.org; Mon, 10 Jan 2011 05:28:56 -0800 In-Reply-To: <87ipxx2gjl.fsf@member.fsf.org> X-Nabble-From: nanjunjie@gmail.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134406 Archived-At: 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.