I have a few classes in a project that should be created only once.
What is the best way to do that?,
- They can be created as static object.
- Can be created as singleton
- Can be created as global.
What is the best design pattern to implement this?
I am thinking of creating all classes as singleton, but that would create lot of singletons. Is it good programming practice to have lot of singletons?
What are the pros and cons for using singletons?