diff options
Diffstat (limited to 'util/concurrency/vars.cpp')
-rw-r--r-- | util/concurrency/vars.cpp | 4 |
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) { |