- changed status to resolved
file buffered port isn't flushed when GCed
Issue #164
resolved
It's not a bug but the following should be flushed when GCed.
(import (rnrs))
(define file "tmp")
(when (file-exists? file) (delete-file file))
(let ((out (open-file-output-port file (file-options no-fail)
(buffer-mode block)
(native-transcoder))))
(put-string out "hello")
;; oops
)
(gc)
(call-with-input-file file
(lambda (in) (print (get-string-all in))))
Comments (1)
-
reporter - Log in to comment
Adding Sg_FinalizerRegisteredP. Swapping port finalizer on buffered port creation to flush when the port is GCed (Fixes
#164)→ <<cset 6f7d8bd66c65>>