We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 333537a commit d4e4207Copy full SHA for d4e4207
src/base-object-inl.h
@@ -65,9 +65,8 @@ inline Environment* BaseObject::env() const {
65
template <typename Type>
66
inline void BaseObject::WeakCallback(
67
const v8::WeakCallbackInfo<Type>& data) {
68
- Type* self = data.GetParameter();
+ std::unique_ptr<Type> self(data.GetParameter());
69
self->persistent().Reset();
70
- delete self;
71
}
72
73
src/env-inl.h
@@ -349,7 +349,7 @@ inline Environment::~Environment() {
349
#if HAVE_INSPECTOR
350
// Destroy inspector agent before erasing the context. The inspector
351
// destructor depends on the context still being accessible.
352
- inspector_agent_.reset(nullptr);
+ inspector_agent_.reset();
353
#endif
354
355
context()->SetAlignedPointerInEmbedderData(kContextEmbedderDataIndex,
0 commit comments