From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rixed@happyleptic.org Newsgroups: gmane.lisp.guile.user Subject: Re: EXTERNAL: Re: Guile 1.8 Garbage Collection Question Date: Wed, 26 Oct 2011 18:28:04 +0200 Message-ID: <20111026162804.GA12099@ccellier.rd.securactive.lan> References: <1B716C7666FD684A9FDF0FBD5EE5E0A0156F8529@HDXDSP11.us.lmco.com> <87sjmgno48.fsf@pobox.com> <1B716C7666FD684A9FDF0FBD5EE5E0A0156F9640@HDXDSP11.us.lmco.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1319646502 12015 80.91.229.12 (26 Oct 2011 16:28:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 26 Oct 2011 16:28:22 +0000 (UTC) To: "guile-user@gnu.org" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Oct 26 18:28:18 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RJ6Kv-000060-R4 for guile-user@m.gmane.org; Wed, 26 Oct 2011 18:28:17 +0200 Original-Received: from localhost ([::1]:43397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ6Ku-0008MW-WB for guile-user@m.gmane.org; Wed, 26 Oct 2011 12:28:16 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ6Kq-0008M4-2k for guile-user@gnu.org; Wed, 26 Oct 2011 12:28:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJ6Ko-00019J-QQ for guile-user@gnu.org; Wed, 26 Oct 2011 12:28:12 -0400 Original-Received: from eneide.happyleptic.org ([213.251.171.101]:40143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ6Ko-000198-M7 for guile-user@gnu.org; Wed, 26 Oct 2011 12:28:10 -0400 Original-Received: from extranet.securactive.org ([82.234.213.170] helo=ccellier.rd.securactive.lan) by eneide.happyleptic.org with esmtp (Exim 4.72) (envelope-from ) id 1RJ6Oh-0004C6-EB for guile-user@gnu.org; Wed, 26 Oct 2011 18:32:11 +0200 Original-Received: from rixed by ccellier.rd.securactive.lan with local (Exim 4.72) (envelope-from ) id 1RJ6Ki-0003C0-6o for guile-user@gnu.org; Wed, 26 Oct 2011 18:28:04 +0200 Mail-Followup-To: rixed@happyleptic.org, "guile-user@gnu.org" Content-Disposition: inline In-Reply-To: <1B716C7666FD684A9FDF0FBD5EE5E0A0156F9640@HDXDSP11.us.lmco.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 213.251.171.101 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8911 Archived-At: > { > // Storage for temporary string > char* s = NULL; > > scm_dynwind_begin (0); > s = scm_to_locale_string (scm_val); > > fstWriterEmitValueChange(SCM_TO_CTX (scm_ctx), > SCM_TO_FSTHANDLE (scm_fsthandle), > s); > scm_dynwind_free (s); > scm_dynwind_end(); > > return SCM_UNSPECIFIED; > } You are supposed to call scm_dynwind_free(s) before anything that can throw, ie right after the call to scm_to_locale_string(), IMHO.