Commit 11ff9f99 authored by Daniel Sommermann's avatar Daniel Sommermann Committed by Andrii Grynenko

Revert "Leak folly::SingletonVault"

Summary:
This reverts commit 3cf88fb680b4b9c47189d1e12699e2c24c7ac38b. It
was timing out our tests. probably static (de)initialization order fiasco related.

Test Plan: watch contbuild, git bisect

Reviewed By: afrind@fb.com

Subscribers: doug, njormrod

FB internal diff: D1593016
parent c64d359b
......@@ -55,21 +55,7 @@ void SingletonVault::destroyInstances() {
}
SingletonVault* SingletonVault::singleton() {
static SingletonVault* vault = new SingletonVault();
return vault;
static SingletonVault vault;
return &vault;
}
namespace {
class SingletonVaultDestructor {
public:
~SingletonVaultDestructor() {
SingletonVault::singleton()->destroyInstances();
}
};
SingletonVaultDestructor singletonVaultDestructor;
}
}
......@@ -167,8 +167,6 @@ class SingletonVault {
enum class Type { Strict, Relaxed };
explicit SingletonVault(Type type = Type::Relaxed) : type_(type) {}
// Destructor is only called by unit tests to check destroyInstances.
~SingletonVault();
typedef std::function<void(void*)> TeardownFunc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment