Permalink
Browse files

Fix issue in 5b7fb10

  • Loading branch information...
1 parent 5b7fb10 commit 5ab93502d04657a0fdc08814970d875312912280 @ry ry committed Jun 26, 2009
Showing with 3 additions and 5 deletions.
  1. +2 −3 src/node.cc
  2. +1 −2 src/process.cc
View
@@ -52,10 +52,9 @@ ObjectWrap::Attach ()
void
ObjectWrap::Detach ()
{
- if (attach_count_ > 0)
- attach_count_ -= 1;
+ if (attach_count_ > 0) attach_count_ -= 1;
- if(weak_ && attach_count_ == 0) {
+ if (weak_ && attach_count_ == 0) {
V8::AdjustAmountOfExternalAllocatedMemory(-size());
delete this;
}
View
@@ -224,8 +224,6 @@ Process::Shutdown ()
ev_child_stop(EV_DEFAULT_UC_ &child_watcher_);
/* XXX Kill the PID? */
pid_ = 0;
-
- Detach();
}
static inline int
@@ -504,5 +502,6 @@ Process::MaybeShutdown (void)
}
Shutdown();
+ Detach();
}
}

0 comments on commit 5ab9350

Please sign in to comment.