| 50 | } |
| 51 | |
| 52 | Module::~Module() |
| 53 | { |
| 54 | // DV: The current Registry code makes unloading of the modules |
| 55 | // impossible. The order in which static objects are destroyed |
| 56 | // may result in the Registry instance being destroyed after the ModuleManager. |
| 57 | // The way Audacity is currently implemented, it is not possible to |
| 58 | // guarantee that the ModuleManager instance is initialized before |
| 59 | // any of the Registry instances. |
| 60 | if (mLib != nullptr && mLib->IsLoaded()) |
| 61 | mLib->Detach(); |
| 62 | } |
| 63 | |
| 64 | static BasicUI::MessageBoxResult DoMessageBox(const TranslatableString &msg) |
| 65 | { |