3 ms·
How is that not a singleton? I can see the argument that dependency injection is better than a factory method. Especially considering the memory model, but I
by taeric 13y ago
How is that not a singleton? I can see the argument that dependency injection is better than a factory method. Especially considering the memory model, but I thought this was still a singleton.
- masklinn 13y ago> How is that not a singleton? The way it is normally used, a singleton is a self-managing, globally accessible, single-instanced object (lazy or not). Just having a single instance does not a singleton make.
- taeric 13y agoSo the complaint is against the implementation detail of a singleton? Because, just having a single instance is the crux of the benefit for that pattern.