[driver] and move object cleaning in terminate too
[driver] and move object cleaning in terminate too

atexit() is run whether there has been an error or we return normally so
it's better to do the cleaning there!

k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/scc