chicken-users
[Top][All Lists]
Advanced

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

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


From: felix winkelmann
Subject: Re: [Chicken-users] newbie: questions about set-finalizer!
Date: Mon, 22 Dec 2008 09:02:44 +0100

On Sat, Dec 20, 2008 at 4:04 PM, Alejandro Forero Cuervo
<address@hidden> wrote:
>
>> Please try attached patch. I have added it to trunk and the chicken-3
>> branch, and did some tests, but testing finalization is always somewhat
>> difficult.
>
> I tried the patch (on 3.4.0) and it did not work.
>
> Running in csi the original code in my report,
>
>  (define x (list 1 2 3))
>  (begin (set-finalizer! x (lambda (o) (format #t "Delete: ~A~%" o))) #t)
>  (define y (list 4 5 6))
>  (begin (set-finalizer! y (let ((p x)) (lambda (o) (format #t "Delete: ~A: 
> ~A~%" o p)))) #t)
>  (gc #t)
>  (set! x #f)
>  (gc #t)
>
> , still produces the "Delete (1 2 3)" message, which it shouldn't.
>

You're right. My bad. I'll try once more.


cheers,
felix




reply via email to

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