From 91b5469c3ccb41ddcf7bc822e4d1e0285e32a02e Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Fri, 17 Jan 2025 20:29:01 +0100 Subject: [PATCH] fix the leak --- src/objstore.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/objstore.cc b/src/objstore.cc index 7ef5d72..434e079 100644 --- a/src/objstore.cc +++ b/src/objstore.cc @@ -120,6 +120,8 @@ Value PyObjectWrap::NewCallable(Napi::Env env, PyStrongRef &&py) { VERBOSE_PYOBJ(CALL, *py, "Funcstore retrieve"); assert(!it->second->Value().IsEmpty()); js = it->second->Value(); + // The caller expects this to be destroyed + py = nullptr; } return js;