Calypsi-tool-chains
Calypsi-tool-chains copied to clipboard
Feature request: __attribute__((cleanup(cleanup_function)))
From the GCC manual:
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.
I personally think this is a really useful thing to have, I use it all the time, and it would be wonderful to have in Calypsi, if it's not too much work.