Commit b950daf8 authored by Anna Henningsen's avatar Anna Henningsen Committed by gengjiawen
Browse files

src: use single ObjectTemplate for TextDecoder

`ObjectTemplate`s are not garbage-collected like regular objects
(for some reason). It is sufficient to create a single template
anyway, so do that to address the memory leak.

Fixes: https://github.com/nodejs/node/issues/32424

PR-URL: https://github.com/nodejs/node/pull/32426


Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
parent 2fa74e3e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment