> Simon Marlow told that addFinalizer is unsafe. The object can be
> silently reboxed and then the finalizer can fire much earlier anyway.

I forgot to mention that addFinalizer on an Addr is unsafe for another
reason: the Addr is unboxed in Haskell before being passed to a foreign
function, which leaves a small window where the boxed Addr is unreferenced
but the Addr# is still required.

Cheers,
        Simon

Reply via email to