[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EXTERNAL: Re: Guile 1.8 Garbage Collection Question
From: |
rixed |
Subject: |
Re: EXTERNAL: Re: Guile 1.8 Garbage Collection Question |
Date: |
Wed, 26 Oct 2011 18:28:04 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
> {
> // 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.