Marcin 'Qrczak' Kowalczyk wrote:
"Iavor S. Diatchki" <[EMAIL PROTECTED]> writes:
I find the argument a bit disturbing, as it seems to imply that it
is OK for the compiler to produce code without any context switches
at all
Note that in this case if the main program doesn't explicitly block
on MVars, I/O nor timeout, then finalizers will never be run and would
be kept in memory despite garbage collection. So such implementation
would not be able to run certain programs which create lots of
finalized objects, even if almost all of them become dead soon after
creation.
This is little different from the situation with GC-based finalization
in other languages (cf Java). This is why finalizers are generally
viewed as a backstop to clean up resources which were accidentally left
un-freed, rather than a universal solution to cleanup.
-Jan-Willem Maessen
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe