Browse thread
[Caml-list] GC and file descriptors
-
Dustin Sallings
- David Fox
- Nicolas George
- Mikael Brockman
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Dustin Sallings <dustin@s...> |
| Subject: | Re: [Caml-list] GC and file descriptors |
On Nov 14, 2003, at 5:42, Damien Doligez wrote: >> Garbage collecting the subprocesses and file descriptors would make >> this a bit more straightforward. > > The problem with this approach is that the "close" and "wait" > system calls have side effects. I don't like the idea of a GC > that has side effects other than the memory size of the program > (and finalisation functions, of course). But what is the purpose of a finalization function that doesn't have a side effect? They are defined as (;a -> unit) which implies to me that the only purpose of the thing is to produce a side effect. close() seems to be conceptually the same finalization as free() to me. It releases a system resource back to the process that would otherwise be unavailable forever. -- Dustin Sallings ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners