"Erik Huelsmann" writes:
In Lisp, automatic resource deallocation is most often done in the cleanup clauses of an UNWIND-PROTECT that's nicely abstracted in some WITH-FOO macro.
Yes, however, from the point of view of the library, this can't be guaranteed. If the library can make sure the resources will be de-allocated, I'm of the opinion it should.
I think it's reasonable for the library to hook into the garbage collector, and warn about garbage-collected but not yet closed external ressources (and close them, incidentally.)
It should, however, not try to make the user think that relying on the GC for closing external ressources is a good design choice.
-T.