> The spec says there are no guarantees on the order in which the
> finalizers are run.  Doesn't this make this function almost
> impossible to use?  Suppose one finalizer frees the storage and the
> other cleans up something it refers to.

I seem to remember that Sigbjorn and Erik dealt with this problem by
arranging some kind of GC-visible link between the objects so that
until the second finalizer has run, the object will not be considered
garbage.

I can't remember the details though...  Can you remind us how it
worked, Sigbjorn?  Was it in the heaven from hell paper?

--
Alastair

_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to