Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
6 files changed
+15
-18
No files matched your search
+2
-2
@@ -8,7 +8,7 @@
|
||||
namespace vl::mod {
|
||||
|
||||
std::size_t ModLoader::loadModule(const std::string& path, const Context& ctx, bool isGlobal) {
|
||||
void* handle = LoadLibrary(path, isGlobal);
|
||||
void* handle = LoadModLibrary(path, isGlobal);
|
||||
if (!handle) throw std::runtime_error(std::string("dlopen failed: "));
|
||||
handles_.push_back(handle);
|
||||
|
||||
@@ -49,7 +49,7 @@ void ModLoader::stopAll() {
|
||||
void ModLoader::unloadAll() {
|
||||
stopAll();
|
||||
instances_.clear();
|
||||
for (auto* h : handles_) if (h) CloseLibrary(h);
|
||||
for (auto* h : handles_) if (h) CloseModLibrary(h);
|
||||
handles_.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user