MCPcopy Create free account
hub / github.com/pybind/pybind11 / alive

Method alive

tests/constructor_stats.h:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 }
130
131 int alive() {
132 gc();
133 int total = 0;
134 for (const auto &p : _instances) {
135 if (p.second > 0) {
136 total += p.second;
137 }
138 }
139 return total;
140 }
141
142 void value() {} // Recursion terminator
143 // Takes one or more values, converts them to strings, then stores them.

Callers 15

test_reference_internalFunction · 0.80
TEST_SUBMODULEFunction · 0.80
assert_keeps_aliveFunction · 0.80
test_eigen_keepaliveFunction · 0.80
test_dynamic_attributesFunction · 0.80
test_cyclic_gcFunction · 0.80
test_init_factory_basicFunction · 0.80
test_init_factory_aliasFunction · 0.80
test_init_factory_dualFunction · 0.80

Calls

no outgoing calls

Tested by 15

test_reference_internalFunction · 0.64
TEST_SUBMODULEFunction · 0.64
assert_keeps_aliveFunction · 0.64
test_eigen_keepaliveFunction · 0.64
test_dynamic_attributesFunction · 0.64
test_cyclic_gcFunction · 0.64
test_init_factory_basicFunction · 0.64
test_init_factory_aliasFunction · 0.64
test_init_factory_dualFunction · 0.64