Fix tutorial showing how to create a new container

Containers should be shared because they're designed to work accross threads.
This commit is contained in:
Mike Bierlee 2016-02-15 20:35:47 +01:00
parent 851eeade45
commit 2cc8f3d68a

View file

@ -7,7 +7,7 @@ The container
To register a class, a new dependency container must be instantiated: To register a class, a new dependency container must be instantiated:
```d ```d
// Register a private container // Register a private container
auto dependencies = new DependencyContainer(); shared(DependencyContainer) dependencies = new DependencyContainer();
// Or use the singleton container // Or use the singleton container
dependencies = DependencyContainer.getInstance(); dependencies = DependencyContainer.getInstance();
``` ```