ross at soi.city.ac.uk
Mon Sep 23 18:14:11 EDT 2002
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'd suggest running the finalizers in the reverse order
to the order they were added, i.e. the new finalizer will be run before
any existing ones. Now that finalizers are FunPtrs, there should be
fewer semantics problems.
More information about the FFI