From ecad77057af13a4485bf1db05ffdcbb720a44779 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 18 Sep 2023 08:10:54 +0200 Subject: [PATCH] Tests: fix a memory leak in StringIDRefTest::getPyObject --- tests/src/App/StringHasher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/App/StringHasher.cpp b/tests/src/App/StringHasher.cpp index a8edf85116..298f8c42c3 100644 --- a/tests/src/App/StringHasher.cpp +++ b/tests/src/App/StringHasher.cpp @@ -1002,8 +1002,8 @@ TEST_F(StringIDRefTest, getPyObject) // NOLINT auto empty = App::StringIDRef(); // Act - Py::Object pyObject(ref.getPyObject()); - Py::Object none(empty.getPyObject()); + Py::Object pyObject(ref.getPyObject(), true); + Py::Object none(empty.getPyObject(), true); // Assert EXPECT_TRUE(PyObject_TypeCheck(pyObject.ptr(), &App::StringIDPy::Type));