The finalizers do run if I insert unsafeFinalize fps right before recursing into foo, like this:

main = do foo data_
          performGC

foo [] = return ()
foo (x:xs) =
    do let fps = P.packWords x
       installFinalizer fps
       putStrLn $ "fps: " ++ show fps
       unsafeFinalize fps
       foo xs

installFinalizer fps@(P.PS fp _ _) =
    addForeignPtrConcFinalizer fp $
       putStrLn $ "--- Finalized: " ++ show (P.unpackWords fps)

        Thanks, Joel

On Nov 6, 2005, at 2:29 PM, Joel Reymont wrote:

David,

I followed your suggestion and I think the finalizers for FPS are not running.

Please take a look at http://wagerlabs.com/Bar.hs to see what I mean. I had to modify the FPS export list to expose the constructor but that's the only change I made.

--
http://wagerlabs.com/





_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to