[Haskell-cafe] IORef memory leak

Tim Docker twd2 at dockerz.net
Fri Jun 19 00:04:46 EDT 2009


> I'm having some trouble with excessive memory use in a program that uses
> a lot of IORefs.  I was able to write a much simpler program which
> exhibits the same sort of behavior.  It appears that "modifyIORef" and
> "writeIORef" leak memory; perhaps they keep a reference to the old
> value.  I tried both ghc-6.8.3 and ghc-6.10.1.

modifyIORef and writeIORef are not sufficiently strict for your needs. See
this recent thread:

http://www.nabble.com/Stack-overflow-td23746120.html

Tim




More information about the Haskell-Cafe mailing list