Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If you are not afraid of GCC extensions, then here: https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Varia...
cleanup (cleanup_function)
The cleanup 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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question