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. _______________________________________________ FFI mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/ffi