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:Matheus Marchini <mat@mmarchini.me> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
parent
f2b0fb27
Please register or sign in to comment