Hello Pelle...
Just came up with the idea of some kind of compiler construct (say, pragma) allowing to execute the functions upon the scope exit.
Kinda the #pragma exit but the functions are executed whenever the scope in which that pragmas were put is leaved. Another difference is to allow to pass one or several parameters to the function. Such a scope-exit list could be static code, generated by the compiler (easy way to allow several parameters to the functions). Also it would be nice if the compiler could allow such a contruct to be put into the #define directive, so the programmer could declare the variable and put the deinitializer for it nearby.
The main goal for it is to provide the hook for the programmer to deallocate resources.
I know that this smells cpp-ish but IMHO that would be a nice feature.
Regards,
Andy aka castor
BTW have you been told you have created sweet nice piece of software?... =D>