Index: src/platform-freebsd.cc |
diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc |
index 6b1c987e2ff9ebadd7cb16e9fde4047fa6b26654..4a6845ef397eade1f43d15d8e8dabdb8156240d5 100644 |
--- a/src/platform-freebsd.cc |
+++ b/src/platform-freebsd.cc |
@@ -716,11 +716,8 @@ class SignalSender : public Thread { |
: Thread(Thread::Options("SignalSender", kSignalSenderStackSize)), |
interval_(interval) {} |
- static void SetUp() { |
- if (!mutex_) { |
- mutex_ = OS::CreateMutex(); |
- } |
- } |
+ static void SetUp() { if (!mutex_) mutex_ = OS::CreateMutex(); } |
+ static void TearDown() { delete mutex_; } |
static void AddActiveSampler(Sampler* sampler) { |
ScopedLock lock(mutex_); |
@@ -864,6 +861,12 @@ void OS::SetUp() { |
} |
+void OS::TearDown() { |
+ SignalSender::TearDown(); |
+ delete limit_mutex; |
+} |
+ |
+ |
Sampler::Sampler(Isolate* isolate, int interval) |
: isolate_(isolate), |
interval_(interval), |