Remove unnecessary initOnce

The class is synchronized now. Calls to getInstance is already barricaded by the class-level monitor.
This commit is contained in:
Mike Bierlee 2015-03-28 17:49:30 +01:00
parent 1ea60f12ec
commit ee88b68a7c

View file

@ -273,6 +273,9 @@ synchronized class DependencyContainer {
*/
public static shared(DependencyContainer) getInstance() {
static shared DependencyContainer instance;
return initOnce!instance(new DependencyContainer());
if (instance is null) {
instance = new DependencyContainer();
}
return instance;
}
}