Should I use a modified singleton design pattern that only allows one reference to its instance?
- by Graham
Hi,
I have a class that would normally just generate factory objects, however this class should only used once throughout the program in once specifix place. What is the best design pattern to use in this instance?
I throught that having a modified singleton design which only allows one reference to instance throughout the program would be the correct way to go. So only the first call to getInstance() returns the factory library.
Is this a good or bad idea? Have I missed out another fundermental design pattern for solving this problem?
Thanks for your help.