[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Program that uses Guile crashes

From: Marius Vollmer
Subject: Re: Program that uses Guile crashes
Date: 30 Nov 2002 14:32:08 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

"Janos Blazi" <address@hidden> writes:

> Can new and Guile's own allocation scheme coexist?

Yes, certainly.  However, Guile's allocation scheme is quite different
from new/delete or malloc/free.  You don't have to explicitely delete
or free a object, but you have to take care that the object is always
properly visible to Guile's garbage collector.  Objects on the C stack
and inside other Guile objects are automatically visible, but other
objects might not be.  For those, you have to call
scm_gc_protect_object and scm_gc_unprotect object at appropriate
times.  Or turn your structure into a smob.

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

reply via email to

[Prev in Thread] Current Thread [Next in Thread]