From 9b587c461b06af06e78070b86d9b99da7d863065 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Fri, 22 Dec 2023 11:07:00 +0100 Subject: [PATCH] call js_std_free_handlers() in the code generated by qjsc (github issue #96) --- Makefile | 7 +++---- qjsc.c | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 082fc73..9b003f0 100644 --- a/Makefile +++ b/Makefile @@ -155,10 +155,9 @@ endif # examples ifeq ($(CROSS_PREFIX),) -ifdef CONFIG_ASAN -PROGS+= -else -PROGS+=examples/hello examples/hello_module examples/test_fib +PROGS+=examples/hello +ifndef CONFIG_ASAN +PROGS+=examples/hello_module examples/test_fib ifndef CONFIG_DARWIN PROGS+=examples/fib.so examples/point.so endif diff --git a/qjsc.c b/qjsc.c index d317826..3dc2a12 100644 --- a/qjsc.c +++ b/qjsc.c @@ -330,6 +330,7 @@ static const char main_c_template1[] = static const char main_c_template2[] = " js_std_loop(ctx);\n" + " js_std_free_handlers(rt);\n" " JS_FreeContext(ctx);\n" " JS_FreeRuntime(rt);\n" " return 0;\n"