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

src: close HandleWraps instead of deleting them in OnGCCollect()

When all strong `BaseObjectPtr`s to a `HandleWrap` are gone, we
should not delete the `HandleWrap` outright, but instead close
it and then delete it only once the libuv close callback has been
called.

Based on the valgrind output from the issue below, this has a
good chance of fixing it.

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

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


Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarGireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 2765f2af
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