![](https://secure.gravatar.com/avatar/326b108ffcc42f27628703b0c11ed239.jpg?s=120&d=mm&r=g)
11 Nov
2014
11 Nov
'14
4:04 p.m.
On Mon, Nov 10, 2014 at 8:01 PM, <Joerg-Cyril.Hoehle@t-systems.com> wrote:
The issue with callbacks in CFFI is IMHO one of proper resource deallocation. No one AFAIK has devised a KISS-style lambda callback creation *AND DEALLOCATION* protocol. The reason why deallocation is important is that every lambda callback needs dynamic creation of what the CLISP libffi and GCC call a trampoline. The Lisp system cannot itself determine when the callback trampoline is not needed anymore, so the application MUST tell it.
<http://www.clisp.org/impnotes/dffi.html#dffi-callback-mem> suggests that the trampolines for anonymous foreign callbacks are simply leaked. Is that an accurate interpretation? -- Luís Oliveira http://kerno.org/~luis/