Proposed change to ForeignPtr

George Russell ger at
Tue Sep 10 12:39:32 EDT 2002

Alastair Reid wrote
> We should provide a C function hs_freeStablePtr and explicitly
> say that it is safe to call this from inside a finalizer.
This would be the simplest solution, but would not permit you to do
anything more sophisticated at the Haskell side, such as reference counting
or more complicated strategies to check for possible cycles.  You might end
up having to do all your inter-language GC code in C, ugh.

More information about the FFI mailing list