The Revenge of Finalizers

Ross Paterson ross at soi.city.ac.uk
Mon Oct 14 18:47:23 EDT 2002


On Mon, Oct 14, 2002 at 10:38:55PM +0100, Alastair Reid wrote:
> [...]
> There's a few details to take care of (e.g., avoiding calling cons in
> scheduleFinalizer) but they're all manageable.

Indeed: a ForeignPtr has a list of finalizers, so you can use appendOnto().
In fact there is already a list of finalizers of type IO (), for weak
pointers (though currently emptied manually).



More information about the FFI mailing list