Finalizers and FFI

Alastair Reid alastair at reid-consulting-uk.ltd.uk
Thu Jun 10 11:39:46 EDT 2004


On Thursday 10 June 2004 12:07, MR K P SCHUPKE wrote:
> I don't see why GHC can't have a 'callAllOutstandingFinalizers' call
> as part of _exit() or something...

You can do that if your finalizers are written in C (and don't call back into 
Haskell) but if they are written in Haskell then you potentially finalize an 
object before its last use because one of the other finalizers uses it.

To fix this, you have to run the finalizers in the "right order" but how can 
you tell what the right order is?

--
Alastair Reid


More information about the Glasgow-haskell-users mailing list