<HTML><BODY>I have a structure, that has a filestream inside it. File have to be cosed, when the structure is not used anymore (so gargbage collected).<br><br>Is the best way to do<br>(require ffi/unsafe)<br>(register-finalizer my-obj<br> (lambda (x) (close-output-port (obj-file x))))<br><br>?<br><br>It seems doing right thing, but why `ffi/unsafe'? Is it OK, when my program actually doesn't use FFI?<br><br><br>-- <br>Roman Klochkov</BODY></HTML>