Why do these two examples need a static FunctionReference?
seishun opened this issue · comments
Nikolai Vavilov commented
It's not referred anywhere other than the Init
function and having an "immortal" Napi::FunctionReference
seems unnecessary since the constructor isn't invoked from native code.
Curiously, these two examples were untouched by dc86a66, which replaced the usage of a static FunctionReference with instance data in examples that do need to keep the constructor alive.