summaryrefslogtreecommitdiff
path: root/util/concurrency/vars.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2010-09-24 19:01:03 +0200
committerAntonin Kral <a.kral@bobek.cz>2010-09-24 19:01:03 +0200
commit0ad0c09511a04ebe837f2acb859d47f2aa4e038a (patch)
tree109babcb556f6c5884b77853120717f0617c7a1e /util/concurrency/vars.cpp
parent03e58f81cad8dd4cfcd1530f327116f0cff6ceb3 (diff)
Imported Upstream version 1.6.3
Diffstat (limited to 'util/concurrency/vars.cpp')
-rw-r--r--util/concurrency/vars.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/concurrency/vars.cpp b/util/concurrency/vars.cpp
index 2b46946ff85..8863a278232 100644
--- a/util/concurrency/vars.cpp
+++ b/util/concurrency/vars.cpp
@@ -23,7 +23,9 @@
namespace mongo {
mutex _atomicMutex("_atomicMutex");
- MutexDebugger mutexDebugger;
+
+ // intentional leak. otherwise destructor orders can be problematic at termination.
+ MutexDebugger &mutexDebugger = *(new MutexDebugger());
MutexDebugger::MutexDebugger() :
x( *(new boost::mutex()) ), magic(0x12345678) {