This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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@mdj-pc.nada.kth.se> writes:
> > 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.
> 
> Ah, yes of course!!  I think that means: Wrap a smob around the user's
> data and let the container object point to the linked list of these
> smobs. When the container's mark function is called do not mark those
> smobs that hold a weak reference to the container. And when the smob's
> free function is called they can easily remove themselfs from the
> linked list and invalidate associated data.
> 
> Uh oh!  I've wasted more than five hours on sunday just to find out
> how to track these weak references.  And the easy answer is: wrap a
> smob around them...

Umm, I think I have to clarify that wasn't meant ironically.  It is just 
that I still don't know all the mechanisms that guile offers and how
to use them.  I think a "guile hackers howto" would be nice. :)


Jost

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]