Skip to content

Commit 1d0660f

Browse files
committed
Cleanup leak in test_modules by using new non-extension-module constructor
1 parent 2436f44 commit 1d0660f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/test_modules.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ TEST_SUBMODULE(modules, m) {
6262
class Dupe3 { };
6363
class DupeException { };
6464

65-
// Go ahead and leak, until we have a non-leaking py::module_ constructor
66-
auto dm = py::module_::create_extension_module("dummy", nullptr, new py::module_::module_def);
65+
auto dm = py::module_("dummy");
6766
auto failures = py::list();
6867

6968
py::class_<Dupe1>(dm, "Dupe1");

0 commit comments

Comments
 (0)