[Openmcl-devel] Voodoo: Callbacks and Closures
David Steuber
david at david-steuber.com
Thu May 5 11:19:43 PDT 2005
On May 4, 2005, at 11:09 PM, Gary Byers wrote:
> The callback code in the lisp kernel handles the transition between
> foreign code and lisp code and calls the function in the INDEXth entry
> in the %PASCAL-FUNCTIONS% vector. (It actually calls the functional
> value of the symbol %PASCAL-FUNCTIONS% to do the latter; static symbol
> names were once in short supply ...)
>
> The fact that the functions are referenced from a global variable
> keeps them from getting GCed. The GC can't in general run around
> freeing these things, since it has no idea whether an individual
> entry can be referenced from foreign code. (If the application
> "knows" when a callback pointer can no longer be referenced, it'd
> be fairly simple to delete the entry associated with that pointer.)
>
Does this mean that a CLOS object referenced by the callback is also
protected from getting GCed?
I also have a function for uninstalling an event handler. Once this is
done, the callback will no longer by referenced. What do I need to do
to delete the entry?
More information about the Openmcl-devel
mailing list