Index: src/platform-cygwin.cc |
diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc |
index 8b1e38197f299886b30c7ddcd54db3e31e3ade2d..089ea38d9a1bb2e0eb11de6d6f1551b0a5268ee3 100644 |
--- a/src/platform-cygwin.cc |
+++ b/src/platform-cygwin.cc |
@@ -620,11 +620,8 @@ class SamplerThread : public Thread { |
: Thread(Thread::Options("SamplerThread", kSamplerThreadStackSize)), |
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_); |
@@ -749,6 +746,12 @@ void OS::SetUp() { |
} |
+void OS::TearDown() { |
+ SamplerThread::TearDown(); |
+ delete limit_mutex; |
+} |
+ |
+ |
Sampler::Sampler(Isolate* isolate, int interval) |
: isolate_(isolate), |
interval_(interval), |