MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / DtorCounter

Class DtorCounter

test/objectwrap_removewrap.cc:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6static int dtor_called = 0;
7
8class DtorCounter {
9 public:
10 ~DtorCounter() {
11 assert(dtor_called == 0);
12 dtor_called++;
13 }
14};
15
16Napi::Value GetDtorCalled(const Napi::CallbackInfo& info) {
17 return Napi::Number::New(info.Env(), dtor_called);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected