[Ecls-list] Foreign variables setting problem
Juan Jose Garcia Ripoll
lisp at arrakis.es
Mon Oct 24 04:52:21 UTC 2005
On Mon, 2005-10-24 at 13:34 +0200, Goffioul Michael wrote:
> On the first SETF, CFFI will allocate a foreign string and set *var-string*
> to point to it. The second SETF will do the same, without deallocating the
> string "hello". To deallocate it, you would have to create a foreign-data
> object pointing to the same address as *var-string* and then free it, this
> looks tricky....
But all CFFI users will have this problem, won't they? I will pass this
further to their mailing list.
> Wouldn't it be easier to tell the GC to consider the foreign variable as a
> potential pointer reference to avoid the memory pointed by it from being
> collected?
This can be done. As a note to ourselves, we have to keep in mind that
the number of roots is limited due to an implementation restriction in
the Boehm GC that can be worked around in the future.
Regards,
Juanjo
More information about the ecl-devel
mailing list