Let\'s say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded?
This page from Microsoft goes into the details of DLL initialization and destruction of globals: http://msdn.microsoft.com/en-us/library/988ye33t.aspx