KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The C++ standard 3.6.3 states Destructors for initialized objects of static duration are called as a result of returning from main and as a result of calling exit On windows you have FreeLibrary and linux you have dlclose to unload a dynamically linked library. And you can call these functions before returning from main. A side effect of unloading a shared library is that all destructors for static objects defined in the library are run. Does this mean it violates the C++ standard as these destructors have been run prematurely ?
Tags (comma-separated)
Save Edits
Cancel