file buffered port isn't flushed when GCed

Create issue
Issue #164 resolved
Takashi Kato repo owner created an issue

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)

  1. Log in to comment