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)
Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> writes:
> Look at scm_set_smob_free and scm_set_port_free.
Ah, now I remember that you said "per object".
Since it isn't very common in Scheme to need to do anything special
when an object is GC:d it would be bad cost/benefit to have a GC slot
per default.
You can always arrange for this yourself by letting the free function
of your own objects call a slot you have reserved for such a function.