Skip to content
Discussion options

You must be logged in to vote

Create a new class with JS_NewClass() and give it gc_mark and finalizer functions, see JSClassDef. Mark the constructor in gc_mark (lets the GC know it's there) and JS_FreeValueRT it in the finalizer.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@neko-para
Comment options

@bnoordhuis
Comment options

Answer selected by neko-para
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1196 on October 15, 2025 06:43.