Is there a recommended pattern to ensure finalizer functions are invoked when cleaning up the Runtime/Context? #174
Unanswered
TooTallNate
asked this question in
Q&A
Replies: 1 comment 2 replies
-
JS_FreeRuntime() should run any finalizers whose objects have a reference count of 1. Try building quickjs with |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using the "Class" API in QuickJS (
JS_NewClass()
), I'm seeing the finalizer function not be invoked when the program is shutting down, which leads to reported memory leaks. I would want these finalizers to be invoked before theJS_FreeContext(ctx); JS_FreeRuntime(rt);
calls. Is this the normal behavior of QuickJS or am I doing something wrong?Beta Was this translation helpful? Give feedback.
All reactions