new ForeignPtr without finalizers
Dean Herington
heringto at cs.unc.edu
Mon Jun 9 11:37:34 EDT 2003
Alastair Reid wrote:
> I'm not convinced that merging them into a single function is desirable, but,
> if we wanted to, I think a better FPish solution is to use
>
> Maybe (FinalizerPtr a)
As multiple finalizers are allowed, perhaps we should consider:
newForeignPtr :: [FinalizerPtr a] -> Ptr a -> IO (ForeignPtr a)
addForeignPtrFinalizers :: [FinalizerPtr a] -> ForeignPtr a -> IO ()
-- Dean
More information about the FFI
mailing list