[Top][All Lists]

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

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

From: Hans Bulfone
Subject: Re: finalizers and stuff (Re: [Chicken-users] Cairo binding)
Date: Wed, 12 Mar 2008 00:29:48 +0100
User-agent: Mutt/1.5.16 (2007-06-09)


On Tue, Mar 11, 2008 at 06:53:14PM -0400, John Cowan wrote:

> 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.

with the thread-sleep! at the end it seems to be working ok now - even
without (gc #t) and with csi.  probably not when the app is killed by
a signal or when (exit) is used but i'm not too worried about that for
now... but i still need to think if using finalizers for the directfb
objects is a good idea...
> > 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.

aha thanks for the tip!
in my case it wasn't the problem though... i used csi -script.
i think it was the same thread-sleep! problem but the continuation
that was left in the thread structure closed over more directfb
objects (all i had in my case).  it works fine now.


reply via email to

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