Next Previous Up Top Contents Index

5 Function and Macro Reference

free-foreign-object

Function

Summary

Deallocates the space in memory pointed to by a pointer.
Package

fli

Signature

free-foreign-object pointer => null-pointer

Arguments

pointer

A pointer to the object to de-allocate.

Values

null-pointer

A pointer with address zero.

Description

Thefree-foreign-object function deallocates the space in memory pointed to by pointer, which frees the memory for other uses. The address of pointer is the start of a block of memory previously allocated byallocate-foreign-object.
If pointer is a null pointer thenfree-foreign-object takes no action.
Example

In the following example a boolean type is defined and an instance is created with memory allocated usingallocate-foreign-object. The functionfree-foreign-object is then used to free up the memory used by the boolean.
(fli:define-c-typedef BOOL (:boolean :int))

(setq point (fli:allocate-foreign-object :type 'BOOL))

(fli:free-foreign-object point)

See Also

allocate-foreign-object

LispWorks Foreign Language Interface - 12 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker