Ticket #5365 (closed bug: invalid)
Finalizer running prematurely in ghci
Description
I have been building a library for doing hash consing, but it seemed to incorrectly finalize references to live entries in the hash cons table when I use it from ghci.
I've distilled the problem to the following test case.
Prelude System.Mem.Weak GHC.IO> let x = let y = "foo" in (unsafePerformIO $ addFinalizer y (putStrLn "deleted")) `seq` y Prelude System.Mem.Weak GHC.IO> x "foo" deleted Prelude System.Mem.Weak GHC.IO> x "foo"
Change History
Note: See
TracTickets for help on using
tickets.
