You may want to perform special actions when certain types of object are garbage collected, using the functions
add-special-free-action
,
flag-special-free-action
,
flag-not-special-free-action
and
remove-special-free-action
.
For example, when a file stream is closed, and so garbage collected, the file descriptor must be closed also. This operation can be performed as a special action.