Unverified Commit 668bc11c authored by Anna Henningsen's avatar Anna Henningsen Committed by Matheus Marchini
Browse files

src: delete BaseObjectWeakPtr data when pointee is gone

Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.

Refs: https://github.com/nodejs/node/pull/30374#issuecomment-601848973

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


Reviewed-By: default avatarMatheus Marchini <mat@mmarchini.me>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent f2b0fb27
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