aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js1
-rw-r--r--src/relooper/emscripten/glue.js3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 8c6b0c8e..53b9bb08 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -811,6 +811,7 @@ function JSify(data, functionsOnly, givenFunctions) {
}
}
ret += Relooper.render(blockMap[block.entries[0]]);
+ Relooper.cleanup();
}
return ret;
}
diff --git a/src/relooper/emscripten/glue.js b/src/relooper/emscripten/glue.js
index 92c50500..f5b9e142 100644
--- a/src/relooper/emscripten/glue.js
+++ b/src/relooper/emscripten/glue.js
@@ -13,6 +13,9 @@
RelooperGlue['init'] = function() {
this.r = _rl_new_relooper();
},
+ RelooperGlue['cleanup'] = function() {
+ _rl_delete_relooper(this.r);
+ },
RelooperGlue['addBlock'] = function(text, branchVar) {
assert(this.r);
assert(text.length+1 < TBUFFER_SIZE, 'buffer too small, increase RELOOPER_BUFFER_SIZE');