[plt-scheme] cyclic structure doesn't get collected

From: Hans Oesterholt-Dijkema (hdnews at gawab.com)
Date: Mon Aug 22 18:35:44 EDT 2005


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)

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,


Posted on the users mailing list.