only delete if ready to unload
This commit is contained in:
@@ -150,8 +150,8 @@ namespace Archimedes {
|
||||
}
|
||||
|
||||
virtual Module* load(std::string moduleNameOrPath) {
|
||||
Module* m = reload(moduleNameOrPath);
|
||||
return m != nullptr ? m : dynamicLoad(moduleNameOrPath);
|
||||
Module* m = dynamicLoad(moduleNameOrPath);
|
||||
return m != nullptr ? load(m) : reload(moduleNameOrPath);
|
||||
}
|
||||
|
||||
virtual Module* load(Module* m) {
|
||||
@@ -239,9 +239,8 @@ namespace Archimedes {
|
||||
}
|
||||
}
|
||||
|
||||
delete m;
|
||||
|
||||
if(closable) {
|
||||
delete m;
|
||||
dlclose(h);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user