I have here some objects whose creation involves starting external
processes. I would like these processes to be properly shut down when
the corresponding objects are garbage-collected.
So I tried using `add-finalizer!' for this purpose and couldn't get it
to work. Here is an example:
Welcome to scsh 0.6.7 (RC 1)
Type ,? for help.
> ,open define-record-types primitives
> (define-record-type foo :foo
> (define bar #f)
> (define (make-foo x)
(let ((new-foo (really-make-foo x)))
(set! bar 1)))
> (make-foo 43)
Before: 10608482 words free in semispace
After: 10673414 words free in semispace
I was expecting `bar' to be 1 at this point. The same example works
as expected under Scheme 48 1.3.
Isn't this the way it's supposed to work?
Thanks in advance for any insight.
Emilio C. Lopes <email@example.com>