Marius Vollmer wrote:
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes:


I've found a memory leak in GUILE.

The contents of modules are not garbage collected.


I believe this is fixed in CVS HEAD now in the 'proper' way:

    guile> (define g (make-guardian))
    guile> (g (make-module))
    guile> (gc)
    guile> (g)
    #<module b7b859b0>

The fix consists of storing procedure properties in a weak key
hashtable (as you did), and fixing weak hashtables so that cycles from
the value back to the key get properly collected.


Thanks!

I think this change is a too large to go into 1.6, tho.  Is there a
workaround that you could put into your code, such as


    (set-procedure-property! (module-eval-closure M) 'module #f)

in an appropriate place?

Yes, I've already done that. Any idea of when we will see this in a release?

--
 Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to