You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does indeed work, and avoiding a memory allocation is definitely worth it. I'm not sure how to incorporate this, though. We should probably phase out the existing instance methods and accessors.
@dmitryash we discussed this during today's team meeting. The best approach is to add an alternate set of methods to ObjectWrap<T> and encourage their use over the existing methods. We can deprecate the existing methods and eventually remove them. Not sure what the name should be though – InstanceMethod2() does not seem too expressive. OTOH TemplatedInstanceMethod() is way too long of a name. I dunno ... InstanceMethodT() 🤷 😕
Activity
gabrielschulhof commentedon Nov 17, 2019
This does indeed work, and avoiding a memory allocation is definitely worth it. I'm not sure how to incorporate this, though. We should probably phase out the existing instance methods and accessors.
dmitryash commentedon Nov 18, 2019
Let me take it
gabrielschulhof commentedon Nov 18, 2019
@dmitryash we discussed this during today's team meeting. The best approach is to add an alternate set of methods to
ObjectWrap<T>and encourage their use over the existing methods. We can deprecate the existing methods and eventually remove them. Not sure what the name should be though –InstanceMethod2()does not seem too expressive. OTOHTemplatedInstanceMethod()is way too long of a name. I dunno ...InstanceMethodT()🤷 😕gabrielschulhof commentedon Nov 18, 2019
@dmitryash so if you would like to do a PR, then please, go right ahead 🙂
objectwrap: add template methods
objectwrap: add template methods
objectwrap: add template methods
objectwrap: add template methods