Browse Source

Allow ObjectWrap destructors before Wrap()

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
935f8437fd
  1. 9
      src/node_object_wrap.h

9
src/node_object_wrap.h

@ -13,9 +13,12 @@ class ObjectWrap {
} }
virtual ~ObjectWrap ( ) { virtual ~ObjectWrap ( ) {
handle_->SetInternalField(0, v8::Undefined()); if (!handle_.IsEmpty()) {
handle_.Dispose(); assert(handle_.IsNearDeath());
handle_.Clear(); handle_->SetInternalField(0, v8::Undefined());
handle_.Dispose();
handle_.Clear();
}
} }
template <class T> template <class T>

Loading…
Cancel
Save