with-foreign-object — Wraps the allocation of a foreign object around a body of code.
Macro
with-foreign-object (var type) &body body => form-return
The variable name to bind.
The type of foreign object to allocate. This parameter is evaluated.
The result of evaluating the body.
This function wraps the allocation, binding, and destruction of a foreign object. On CMUCL and Lispworks platforms the object is stack allocated for efficiency. Benchmarks show that AllegroCL performs much better with static allocation.