guile-user
[Top][All Lists]
Advanced

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

Re: static variables with scheme objects


From: Marius Vollmer
Subject: Re: static variables with scheme objects
Date: 19 Jul 2003 00:33:40 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

address@hidden (Paul Jarc) writes:

> sig <address@hidden> wrote:
> > In other words, is it ok to say:
> >
> > mutex_list = scm_permanent_object(scm_list_2(scm_make_mutex(),
> >                                              scm_make_mutex()));
> >
> > or are you required to say
> >
> > [...]
>
> I think the first form is sufficient, but it would be good to hear
> from someone more knowlegeable.

You are right, Paul.  The first form is sufficient.  The GC operates
from a set of `root references' and marks all objects that it can
reach directly or indirectly from there.  Objects that have been
marked are not deallocated.  scm_permanent_object adds an object
permanently to the set of root references so that it is always marked
by the GC.

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




reply via email to

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