Re: [Chicken-users] newbie: questions about set-finalizer!

2008-12-17 Thread felix winkelmann
On Tue, Dec 16, 2008 at 7:36 PM, felix winkelmann wrote: > On Mon, Dec 15, 2008 at 11:57 PM, Alejandro Forero Cuervo > wrote: >> >> I have a question about finalizers. >> >> If you run the following in csi: >> >> (define x (list 1 2 3)) >> (begin (set-finalizer! x (lambda (o) (format #t "Delete

Re: [Chicken-users] newbie: foreign pointers that depend on Scheme objects

2008-12-17 Thread felix winkelmann
On Mon, Dec 15, 2008 at 10:34 PM, Alejandro Forero Cuervo wrote: > > One idea I had was to do the following (plus tweaks to call_the_proc > to de-ref the GC root): > > (define create-closure >(let ((obj ((foreign-lambda* c-closure ((scheme-object proc)) > #< void *root = CHICKEN_new_gc