diff options
Diffstat (limited to 'src/base_object-inl.h')
-rw-r--r-- | src/base_object-inl.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/base_object-inl.h b/src/base_object-inl.h index 74c1458b3d..900fc2b3ed 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -65,9 +65,8 @@ inline Environment* BaseObject::env() const { template <typename Type> inline void BaseObject::WeakCallback( const v8::WeakCallbackInfo<Type>& data) { - Type* self = data.GetParameter(); + std::unique_ptr<Type> self(data.GetParameter()); self->persistent().Reset(); - delete self; } |