chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] memory management of foreign data


From: felix winkelmann
Subject: Re: [Chicken-users] memory management of foreign data
Date: Wed, 15 Dec 2004 07:18:53 +0100

On Tue, 14 Dec 2004 09:06:45 -0500, Ed Watkeys <address@hidden> wrote:
> Hi,
> 
> I haven't been able to find any discussion in the Chicken documentation
> of how to manage memory allocated by foreign code. Do I need to depend
> on the calling Scheme code to deallocate all allocated resources by
> calling procedures that I've provided, or is there some way to tell
> Chicken to call my deallocation code when an object is no longer
> referenced?
> 

If you mean non-Scheme data that is allocated by foreign code,
then you either have to deallocate it manually, or set a finalizer
(on a Scheme object) to be called when the Scheme object is
reclaimed by GC.


cheers,
felix




reply via email to

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