[Main]
Title=cleanup

[Top]
The <CODE>cleanup</CODE> attribute runs a function when the variable goes
out of scope.  This attribute can only be applied to auto function
scope variables; it may not be applied to parameters or variables
with static storage duration.  The function must take one parameter,
a pointer to a type compatible with the variable.  The return value
of the function (if any) is ignored.
<BR><BR>
If <B>'-fexceptions'</B> is enabled, then <I>cleanup_function</I>
will be run during the stack unwinding that happens during the
processing of the exception.  Note that the <CODE>cleanup</CODE> attribute
does not allow the exception to be caught, only to perform an action.
Note that TIGCC defines its own error handling mechanism, so this attribute
will not work if used in this way.
It is undefined what happens if <I>cleanup_function</I> does not
return normally.
