Re: Scheme-reports Digest, Vol 10, Issue 1
Aubrey Jaffer 30 Oct 2010 23:02 UTC
| Date: Sat, 30 Oct 2010 18:02:59 -0400
| From: "Aaron W. Hsu" <arcfide-5nC73gNclPNzbRFIqnYvSA@public.gmane.org>
|
| Nonetheless, how would file descriptors being visible inherently
| lead to leaks?
If the way you refer to file-descriptors is by number, then there is
no way for the garbage collector to prove that a file-descriptor is no
longer in use.
If the garbage collector can't reclaim file-descriptors, then it
becomes the programmer's responsibility to close file-descriptors it
no longer uses. Exceptions or programmer oversights result in leaked
file-descriptors.