Skip to content

Commit

Permalink
Merge pull request #54 from fixstars/feature/avoid-unload-dso
Browse files Browse the repository at this point in the history
Do not unload the DSO
  • Loading branch information
iitaku authored Feb 10, 2021
2 parents 24194c6 + facb09d commit 52c2f04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dynamic_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ class DynamicModule {

~DynamicModule() {
if (handle_ != nullptr) {
// NOTE: DSO which is loaded by with_bb_module should not be unloaded even if Builder is destructed.
// Loading more than twice does not have any side effects.
#ifdef _WIN32
FreeLibrary(handle_);
// FreeLibrary(handle_);
#else
dlclose(handle_);
// dlclose(handle_);
#endif
}
}
Expand Down

0 comments on commit 52c2f04

Please sign in to comment.