chicken-users
[Top][All Lists]
Advanced

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

Re: finalizers and stuff (Re: [Chicken-users] Cairo binding)


From: John Cowan
Subject: Re: finalizers and stuff (Re: [Chicken-users] Cairo binding)
Date: Tue, 11 Mar 2008 18:53:14 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Hans Bulfone scripsit:

> but i'm not sure if it was the right decision now... i've had some problems
> with finalizers not being invoked before the program terminates (and directfb
> complains when not all objects are released properly).  

There are no guarantees about finalizers.  You can call (gc #t) to
force them to be run, but you have to make sure that you control all
exit paths from the program, possibly including signals.

> also, it seemed to not work at all with csi, only when all code is
> compiled.

Finalizers do work in csi, but be aware that csi saves the value of every
form typed into it in variables named #1, #2, #3, ... matching the prompt,
which will effectively suppress finalization of those values.

-- 
Not to perambulate                 John Cowan <address@hidden>
    the corridors                  http://www.ccil.org/~cowan
during the hours of repose
    in the boots of ascension.       --Sign in Austrian ski-resort hotel




reply via email to

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