Index: src/platform-win32.cc |
diff --git a/src/platform-win32.cc b/src/platform-win32.cc |
index e36fc87539dbd65f149e77eea30bb171d4207663..5a603d63e7fad78bf0f6d780b8dab3df55c7b769 100644 |
--- a/src/platform-win32.cc |
+++ b/src/platform-win32.cc |
@@ -1949,11 +1949,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_); |
@@ -2078,6 +2075,12 @@ void OS::SetUp() { |
} |
+void OS::TearDown() { |
+ SamplerThread::TearDown(); |
+ delete limit_mutex; |
+} |
+ |
+ |
Sampler::Sampler(Isolate* isolate, int interval) |
: isolate_(isolate), |
interval_(interval), |