Unverified Commit b7ef5937 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

buffer: release buffers with free callbacks on env exit

Invoke the free callback for a given `Buffer` if it was created
with one, and mark the underlying `ArrayBuffer` as detached.

This makes sure that the memory is released e.g. when addons inside
Workers create such `Buffer`s.

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


Reviewed-By: default avatarGabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarDenys Otrishko <shishugi@gmail.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
parent ab2afa33
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