Running a "final" finaliser

Adrian Hey ahey at
Mon Dec 29 01:39:38 EST 2003

On Tuesday 23 Dec 2003 7:22 am, Adrian Hey wrote:
> Assuming the weak pointers solution is the way to go, I've been
> re-aquainting myself with System.Mem.Weak and now I'm now wondering
> what is an appropriate key for each ForeignPtr.
> Would it be OK to use the ForeignPtr itself as it's own key?
> (Seems OK to me, but this is a bit different from the memoisation
> example so I thought I'd check.)

I guess I should've taken a look at
 mkWeakPtr :: k -> Maybe (IO ()) -> IO (Weak k)
before asking this :-)

Adrian Hey

More information about the Glasgow-haskell-users mailing list