[plt-scheme] Re: [plt-edu] Re: animation projects, video-game and not

From: YC (yinso.chen at gmail.com)
Date: Sat Feb 7 14:58:02 EST 2009

On Sat, Feb 7, 2009 at 11:50 AM, Carl Eastlund <carl.eastlund at gmail.com>wrote:

> > I am probably missing the point here, but I think GC doesn't help with
> > closing file handles or database connections (at least *safely*), no?
> >
> > Thanks,
> > yc
> The PLT Scheme garbage collector does close file handles.  A database
> library certainly could, and should, use the garbage collector to
> close connections.  I don't know which ones do, but that's only my own
> inexperience with Scheme database libraries.  In both cases, GC
> doesn't preclude the option to manually close a connection earlier --
> but GC makes that into an optimization rather than a necessity, for
> most purposes.

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.

Is it the will executor?  It seems that will isn't called by GC, though.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090207/779f20d3/attachment.html>

Posted on the users mailing list.