[Haskell-cafe] Re: [Haskell] Re: state of HaXml?
taralx at gmail.com
Wed Jan 10 13:16:19 EST 2007
On 1/10/07, Malcolm Wallace <Malcolm.Wallace at cs.york.ac.uk> wrote:
> Actually, I'm pretty sure that most Haskell RTS implementations have a
> finalizer attached to all file handles. Once the file handle is no
> longer reachable from the program graph (even if its data has not been
> fully consumed), the GC will close the file (via the finalizer) before
> reaping the memory associated with the handle.
That's not the point. The GC will only close the file when the heap is
under pressure. It does not aggressively close the file, so the file
may stay open for longer than the user likes. For a read-only
operation, this shouldn't matter, however on some platforms an open
file handle can prevent deletion of the file.
Taral <taralx at gmail.com>
"You can't prove anything."
-- Gödel's Incompetence Theorem
More information about the Haskell-Cafe