You are not logged in.
I think we should consider using atexit() to ensure GRRLIB_exit is called when the program terminates.
http://linux.die.net/man/3/atexit
However, we may need to educate some programmers that they should (always) use exit(), not return, to terminate main()
BC
Offline
It's a good idea to add the line atexit(GRRLIB_exit); inside the function GRRLIB_Init(), and ensure the GRRLIB_exit() funtion is not called twice, but forget about educate anybody. In fact, doing a return from main WILL execute functions declared with atexit()
The atexit() function registers the given function to be called at normal process termination, either via exit() or via return from the program's main().
Offline
I never realised that atexit() did not require exit() ...always one more thing to learn ...And useful, as "educating the masses" is not an easy task.
As you say, we also need to add some code to stop repeated calls of code which does not like it.
v4.1.0 is taking a while [while we sort out examples, documentation, etc] ...maybe we can get it done before the point-release
BC
Offline