diff --git a/hphp/runtime/base/file_repository.cpp b/hphp/runtime/base/file_repository.cpp index 45197e889..7ef62d42f 100644 --- a/hphp/runtime/base/file_repository.cpp +++ b/hphp/runtime/base/file_repository.cpp @@ -58,7 +58,7 @@ PhpFile::PhpFile(const string &fileName, const string &srcRoot, PhpFile::~PhpFile() { always_assert(getRef() == 0); - if (m_unit != nullptr) { + if (!memory_profiling && m_unit != nullptr) { // Deleting a Unit can grab a low-ranked lock and we're probably // at a high rank right now PendQ::defer(new DeferredDeleter(m_unit));