[Cffi-devel] Callbacks & Lambdas
Joerg-Cyril.Hoehle at t-systems.com
Joerg-Cyril.Hoehle at t-systems.com
Tue Nov 11 17:11:45 UTC 2014
Luís Oliveira wrote:
<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?
No, reread-the paragraph starting with:
"You can use FFI:FOREIGN-FREE to free the trampoline associated with a FFI:FOREIGN-FUNCTION object, ..."
The paragraph explains that it's not trivial to grab the exact object corresponding to the trampoline. If you don't grab it, it will leak.
Regards,
Jörg Höhle
More information about the cffi-devel
mailing list