<br><br><div class="gmail_quote">On Sat, Feb 7, 2009 at 11:50 AM, Carl Eastlund <span dir="ltr"><<a href="mailto:carl.eastlund@gmail.com">carl.eastlund@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="Ih2E3d">> I am probably missing the point here, but I think GC doesn't help with<br>
> closing file handles or database connections (at least *safely*), no?<br>
><br>
> Thanks,<br>
> yc<br>
<br>
</div>The PLT Scheme garbage collector does close file handles. A database<br>
library certainly could, and should, use the garbage collector to<br>
close connections. I don't know which ones do, but that's only my own<br>
inexperience with Scheme database libraries. In both cases, GC<br>
doesn't preclude the option to manually close a connection earlier --<br>
but GC makes that into an optimization rather than a necessity, for<br>
most purposes.<br></blockquote><div><br>What is the hook to provide GC with such knowledge to close the database handles if I need to implement my own database connection? My failure to find such a hook misled me to think GC can't be made handle external resources gracefully. <br>
<br>Is it the will executor? It seems that will isn't called by GC, though. <br><br>Thanks,<br>yc<br><br></div></div><br>