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

Method destroyed

tests/constructor_stats.h:105–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 void created(void *inst) { ++_instances[inst]; }
104
105 void destroyed(void *inst) {
106 if (--_instances[inst] < 0) {
107 throw std::runtime_error("cstats.destroyed() called with unknown "
108 "instance; potential double-destruction "
109 "or a missing cstats.created()");
110 }
111 }
112
113 static void gc() {
114 // Force garbage collection to ensure any pending destructors are invoked:

Callers 1

track_destroyedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected