24 Sep
2002
24 Sep
'02
6:14 a.m.
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.