[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] newbie: foreign pointers that depend on Scheme objec
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] newbie: foreign pointers that depend on Scheme objects |
Date: |
Tue, 6 Jan 2009 09:48:08 +0100 |
On Sat, Dec 20, 2008 at 4:09 PM, Alejandro Forero Cuervo
<address@hidden> wrote:
>> I'm not sure I can follow your example completely (I always get
>> quickly confused with these scenarios), but I understand the
>> "weak"/"finalizable" GC-root suggestion. I have to think more about
>> it, but it should be possible.
>
> I think this should be implemented: right now it is *impossible* to
> store pointers to Scheme-data inside C-data without the potential for
> memory leaks.
>
Attached is a patch against chicken 4 (should work with chicken 3).
The new C function "CHICKEN_new_finalizable_gc_root" creates
gc roots that can refer to data which is about to be finalized.
cheers,
felix
finalizable-gc-roots.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Chicken-users] newbie: foreign pointers that depend on Scheme objects,
felix winkelmann <=