google/lmctfy — pull request #36 by nipun-sehrawat (2014-08-13 20:10:08+00:00)
Title: Fix memory leak in logging.cc

The change in my CL solves the memory leak problem, but introduces a data race in the following function of logging.cc:
Mutex *InitLogSilencerMutex() {
static Mutex *m = new Mutex(); // Without C++11, this statement has a data race.
return m;
}

The memory leak reported by tcmalloc:
Leak of 336 bytes in 6 objects allocated from:
@ 4c6065 internal::InitLogSilencerCountOnce
@ 4c5e8e internal::LogMessage::Finish
@ 495523 orion::LmctfyContainerManager::Destroy
@ 40fa39 DestroyExisting
@ 40f95f TearDown
@ 7b46b6 testing::internal::HandleSehExceptionsInMethodIfSupported
@ 7b056e testing::internal::HandleExceptionsInMethodIfSupported
@ 798ff6 testing::Test::Run
@ 799716 testing::TestInfo::Run
@ 799d32 testing::TestCase::Run
@ 7a03f6 testing::internal::UnitTestImpl::RunAllTests
@ 7b53b3 testing::internal::HandleSehExceptionsInMethodIfSupported
@ 7b120e testing::int