From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Using the ImageMagick backend seems to leak memory Date: Mon, 10 Jan 2011 11:34:38 +0100 Message-ID: <87ipxx2gjl.fsf@member.fsf.org> References: <87sjx6zczl.fsf@member.fsf.org> <30611405.post@talk.nabble.com> <874o9l86eb.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294655888 2471 80.91.229.12 (10 Jan 2011 10:38:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 10 Jan 2011 10:38:08 +0000 (UTC) Cc: Miles Bader , Jashy , Emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 10 11:38:03 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 1PcF8V-0005vE-1L for ged-emacs-devel@m.gmane.org; Mon, 10 Jan 2011 11:38:03 +0100 Original-Received: from localhost ([127.0.0.1]:48609 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcF8U-0000lc-Ep for ged-emacs-devel@m.gmane.org; Mon, 10 Jan 2011 05:38:02 -0500 Original-Received: from [140.186.70.92] (port=34702 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcF5J-0007l1-7w for Emacs-devel@gnu.org; Mon, 10 Jan 2011 05:34:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcF5I-0004B7-3T for Emacs-devel@gnu.org; Mon, 10 Jan 2011 05:34:45 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:9214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcF5H-0004Av-V0; Mon, 10 Jan 2011 05:34:44 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 3B14278017AF; Mon, 10 Jan 2011 11:34:39 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00506-06; Mon, 10 Jan 2011 11:34:38 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad (tsdh.uni-koblenz.de [141.26.67.142]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 57D527801778; Mon, 10 Jan 2011 11:34:38 +0100 (CET) In-Reply-To: (Andreas Schwab's message of "Fri, 07 Jan 2011 23:39:12 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:134403 Archived-At: Andreas Schwab writes: Hi Andreas, >> Looking at the API, there's >> >> ClearMagickWand() clears resources associated with the wand. >> The format of the ClearMagickWand method is: >> >> void ClearMagickWand(MagickWand *wand) >> >> A description of each parameter follows: >> wand >> the magick wand. >> >> In the emacs sources, that function's never called. So that's >> probably the source of the leak. > > DestroyMagickWand should imply ClearMagickWand, IIUC. > > I've fixed a few resource leaks, but that did not really help. Looking at the code examples at http://www.imagemagick.org/api/magick-wand.php it seems one must call MagickWandTerminus(); after destroying the wands. Maybe that helps. Bye, Tassilo