On Tue 25 Oct 2011 22:34, Whitlock, Bradley D bradley.d.whitl...@lmco.com
writes:
scm_dynwind_unwind_handler (free, s, SCM_F_WIND_EXPLICITLY);
You can write this as scm_dynwind_free (s), FWIW.
Otherwise I didn't see the problem. `s' is not managed by the GC, so
the GC shouldn't have much
;
}
Thanks,
Brad
-Original Message-
From: Andy Wingo [mailto:wi...@pobox.com]
Sent: Wednesday, October 26, 2011 2:39 AM
To: Whitlock, Bradley D
Cc: guile-user@gnu.org
Subject: EXTERNAL: Re: Guile 1.8 Garbage Collection Question
On Tue 25 Oct 2011 22:34, Whitlock, Bradley D bradley.d.whitl
{
// 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);
Now that I've replied to your last message, I think I've spotted the bug:
-[ Tue, Oct 25, 2011 at 08:34:23PM +, Whitlock, Bradley D ]
{
// Storage for temporary string
char* s = NULL;
scm_dynwind_begin (0);
scm_dynwind_unwind_handler (free, s, SCM_F_WIND_EXPLICITLY);
s =
I have built Guile 1.8.8.2 on MinGW.
I have wrapped some gtkwave code with Guile and have a memory issue. The
following code apparently never frees 's', but I am not sure why.
SCM_DEFINE (libguile_fst_writer_emit_value, libguile-fst-writer-emit-value,
3,0,0,
);
return SCM_UNSPECIFIED;
}
-Brad
From: Whitlock, Bradley D
Sent: Tuesday, October 25, 2011 2:34 PM
To: 'guile-user@gnu.org'
Subject: Guile 1.8 Garbage Collection Question
I have built Guile 1.8.8.2 on MinGW.
I have wrapped some gtkwave code with Guile and have a memory issue. The
following
I cant see anything wrong with your function, so I suspect there is something
wrong with the function you pass your string to. Maybe it's trying to write
into s but does write out of bounds insead, damaging the heap ??
Note: it is my understanding that s is allocated on C's heap and so will not