Skip to content
Snippets Groups Projects
Commit 2f4240f9 authored by rswindell's avatar rswindell
Browse files

Added forced garbage collection after script execution.

parent 7e92f76d
No related branches found
No related tags found
No related merge requests found
...@@ -546,6 +546,8 @@ long sbbs_t::js_execfile(char *fname) ...@@ -546,6 +546,8 @@ long sbbs_t::js_execfile(char *fname)
js_script=JS_CompileFile(js_cx, js_glob, path); js_script=JS_CompileFile(js_cx, js_glob, path);
// js_scope=JS_NewScriptObject(js_cx, js_script);
JS_EndRequest(js_cx); /* Required for multi-thread support */ JS_EndRequest(js_cx); /* Required for multi-thread support */
if(js_script==NULL) { if(js_script==NULL) {
...@@ -557,6 +559,8 @@ long sbbs_t::js_execfile(char *fname) ...@@ -557,6 +559,8 @@ long sbbs_t::js_execfile(char *fname)
JS_DestroyScript(js_cx, js_script); JS_DestroyScript(js_cx, js_script);
JS_GC(js_cx);
return(JSVAL_TO_INT(rval)); return(JSVAL_TO_INT(rval));
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment