This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: The taming of the before-gc-hook (was Re: Upcoming 1.3.2 release)
Jost Boekemeier <jostobfe@linux.zrz.TU-Berlin.DE> writes:
> Mikael Djurfeldt <mdj@thalamus.nada.kth.se> writes:
>
> environment use to access the common resource. Once the environment
> is gone its observers will be collected unless someone still
> references it. But then the observer detects that its container (the
> environment) is gone and does nothing.
Forgot something: That will only work if the container object is a
smob and *not* a normal scheme object. For example a vector object or
a pair is not a smob and therefor has no finit() function. To support
encapsulation I think guile should (no *must*) support a per object
finit function. Maybe as an option.
For example:
scm_set_finit(object, free) /* call free befor object is free'ed */
(Mabe this is already available?)
Jost