aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 25251299..ddcf926d 100644
--- a/src/library.js
+++ b/src/library.js
@@ -5102,6 +5102,7 @@ LibraryManager.library = {
} else {
var lib_record = DLFCN_DATA.loadedLibs[handle];
if (--lib_record.refcount == 0) {
+ lib_record.module.cleanups.forEach(function(cleanup) { cleanup() });
delete DLFCN_DATA.loadedLibNames[lib_record.name];
delete DLFCN_DATA.loadedLibs[handle];
}