aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-30 21:32:56 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-03 14:41:30 -0700
commitbeb08e214984a234c82d3a2fd7e984dffdf2f5dc (patch)
tree560045c39234230ca0253f385da5c10e582fef90 /src/library.js
parentd6e21d7851004b2853327d1de468e25ee97fe595 (diff)
clean up shared modules when dlclose()d
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];
}