We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ef71ec commit 98370f2Copy full SHA for 98370f2
tests/test_multiple_interpreters/mod_per_interpreter_gil_with_singleton.cpp
@@ -51,13 +51,15 @@ class MySingleton {
51
static void init() {
52
// Ensure the singleton is created
53
auto &instance = get_instance();
54
+ (void) instance; // suppress unused variable warning
55
assert(instance.objects.size() == 7);
56
// Register cleanup at interpreter exit
57
py::module_::import("atexit").attr("register")(py::cpp_function(&MySingleton::clear));
58
}
59
60
static void clear() {
61
62
63
64
for (const auto &obj : instance.objects) {
65
obj.dec_ref();
0 commit comments