[Haskell-cafe] Are handles garbage-collected?

Ketil Malde ketil+haskell at ii.uib.no
Mon Oct 25 02:46:41 EDT 2004

Remi Turk <rturk at science.uva.nl> writes:

> IMO, [bracket] does indeed have those same drawbacks. (Although the
> traditional "explicit memory management model" is alloc/free,
> which is much worse than bracket/withFile)

Isn't bracket more like stack allocated memory?  And most problems
with explicit memory management related to heap (as you indicate)?

> The theoretical solution (and probably _only_ theoretical) is
> implementing a lot of garbage collectors: one for memory, one for
> open files, one for sockets, one for 3D polygon meshes etc etc...

...or have a number of available file handles that is limited by
memory? :-)

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list