[plt-scheme] cyclic structure doesn't get collected
L.S.,
I've a little trouble with mzgtk2. I'm trying to do following:
1. scheme_malloced C structure A references Gtk GObject B
2. scheme closure X references C structure.A
3. structure A references scheme closure X and a function Y that is
part of closure X.
Let W be scheme closure X.
I'd now expect:
(set! W 10)
(collect-garbage)
To collect structure A, which finalizes closure X and unreferences Gtk
GObject B.
Why does it not work? In my opinion, it can be proved, that
closure X and structure A only reference each other, are not in
any (lexical) scope, i.e. can be safely collected.
Can anyone help?
Thanks in advance,
Hans