diff --git a/.changeset/warm-lobsters-hope.md b/.changeset/warm-lobsters-hope.md new file mode 100644 index 00000000..5527711b --- /dev/null +++ b/.changeset/warm-lobsters-hope.md @@ -0,0 +1,5 @@ +--- +'nxjs-runtime': patch +--- + +Fix object memory leak in `CanvasRenderingContext2D` diff --git a/source/canvas.c b/source/canvas.c index cf5bb6f7..3b1515c3 100644 --- a/source/canvas.c +++ b/source/canvas.c @@ -103,9 +103,6 @@ static JSValue js_canvas_new_context(JSContext *ctx, JSValueConst this_val, int return obj; } - // TOOD: this probably needs to go into `framebuffer_init` instead - JS_DupValue(ctx, obj); - // On Switch, the byte order seems to be BGRA cairo_surface_t *surface = cairo_image_surface_create_for_data( buffer, CAIRO_FORMAT_ARGB32, width, height, width * 4);