diff --git a/source/poodinis/container.d b/source/poodinis/container.d index 32e6fb6..fff7026 100644 --- a/source/poodinis/container.d +++ b/source/poodinis/container.d @@ -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; } }