Patterns: Local Singleton vs. Global Singleton?
- by Mike Rosenblum
There is a pattern that I use from time to time, but I'm not quite sure what it is called. I was hoping that the SO community could help me out.
The pattern is pretty simple, and consists of two parts:
A singleton factory, which creates objects based on the arguments passed to the factory method.
Objects created by the factory.
So far this is…