mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Remove unnecessary initOnce
The class is synchronized now. Calls to getInstance is already barricaded by the class-level monitor.
This commit is contained in:
parent
1ea60f12ec
commit
ee88b68a7c
|
@ -273,6 +273,9 @@ synchronized class DependencyContainer {
|
||||||
*/
|
*/
|
||||||
public static shared(DependencyContainer) getInstance() {
|
public static shared(DependencyContainer) getInstance() {
|
||||||
static shared DependencyContainer instance;
|
static shared DependencyContainer instance;
|
||||||
return initOnce!instance(new DependencyContainer());
|
if (instance is null) {
|
||||||
|
instance = new DependencyContainer();
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue