
9 Jun
2004
9 Jun
'04
6:01 p.m.
import Foreign.ForeignPtr
I couldn't get finalisers to work either with the newForeignPtr from this module. I didn't know how to create a proper FunPtr.
You create a FunPtr using foreign import: foreign import ccall "malloc.h &free" free_ptr :: FunPtr (Ptr a -> IO ())
In Foreign.Concurrent there is a newForeignPtr that is easier to use:
But, sadly, not portable. -- Alastair Reid