guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scheme closures: crash during garbage collection


From: gregory benison
Subject: Re: scheme closures: crash during garbage collection
Date: Thu, 13 Jul 2006 04:34:47 -0400




I think there can be a solution to this issue without any big change in the way guile-gnome deals with refcounting and memory management. I am aiming for a substitute for scm_gc_protect_object() / scm_gc_unprotect_object() which has the same semantics but is safe to call during GC, and I think I have it.

My proposed fix for the garbage collection issue can be tested by applying the attached patch file to the directory where gclosure.c lives.
Here is a short code snippet that exercises the gc protection mechanism:

(use-modules (gnome gtk))
(define obj (make <gobject>))
(connect obj 'notify (lambda args 'ok))
(gc)
(set! obj #f)
(gc)
(gc)


======================
Gregory Benison
Oregon State University
(541)-737-1876
address@hidden
======================

Attachment: patch-gcb-13jul06.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]