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?