Just a quick question (I hope).
Is it possible to give gcc a directive/pragma to get it to run a cleanup function when a library is unloaded? This would be trivial in C++ - it would just be a destructor. Do I need to rewrite my code inside a class and use g++, or can I keep my code pure C and still manage this?
Thanks for any advice.