Raymond Toy <[EMAIL PROTECTED]> writes:

> >>>>> "James" == James A Crippen <[EMAIL PROTECTED]> writes:
> 
>     James> Which is fine, because although EXT:FINALIZE is really useful, it
>     James> doesn't work in all cases for me, so I'm just going to have to write
>     James> C-like code to track when and where to free alien objects...  Bleah.
> 
> In what way does this not work?  I'd like to know, even if we can't
> fix it.

I have to free stuff that comes from C-land.  I don't allocate the
stuff in C land and I can't actually look at what I've been given from
C-land.  I just have to pass the pointer back into C-land for other C
functions.  But I have to free the damned thing at some point.  It
turns out that this is much more of a PITA to do with FINALIZE than it
is just to explicitly deallocate it.

That and I have a *ton* of different C structs to deal with, and
wrapping them all up in Lisp defstructs would be *very* inconvenient.
I'd have to change all of my code to use FINALIZE and it wouldn't be
portable anyway.  (I'm hedging the design so that it won't be terribly
painful to port to UFFI someday.)

'james

-- 
James A. Crippen <[EMAIL PROTECTED]> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.20939N, -149.767W
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.

Reply via email to