22 Jan
2003
22 Jan
'03
6:54 p.m.
Since you're retaining foreign language finalizers, you need a way to get the equivalent of Marshal.Alloc.free as such a finalizer, as discussed in http://www.haskell.org/pipermail/ffi/2002-September/000729.html I favour option (3) from there: Marshal.Alloc.finalizerFree :: FunPtr (Ptr a -> IO ()) but doing (4) as well would be harmless, I guess. And then there is the small matter that GHC doesn't currently implement foreign language finalizers, or finalizer ordering.