Macro
fli
with-dynamic-foreign-objects bindings &body body => last
bindings ::= ((var foreign-type)*)
body ::= form*
A list of variable bindings.
A symbol to be bound to a foreign type.
A foreign type descriptor to be bound to the variable var.
A list of forms to be executed with bindings in effect.
A form to be executed.
The value of the last form in body.
with-dynamic-foreign-objects
binds variables according to the list bindings, and then executes body. Each element of bindings is a list which binds a symbol to a pointer which points to a locally allocated instance of a foreign type. The lifetime of the bound foreign objects, and hence the allocation of the memory they take up, is within the scope of thewith-dynamic-foreign-objects
function. allocate-dynamic-foreign-object
within body will automatically be deallocated once the scope of thewith-dynamic-foreign-objects
function has been left. allocate-dynamic-foreign-object
. with-dynamic-foreign-objects
andallocate-dynamic-foreign-object
is given in "An example of dynamic memory allocation" on page 6. allocate-dynamic-foreign-object
free-foreign-object
with-coerced-pointer