Singleton design patterns can be designed either using 'Eager' or 'Lazy' initialization.
Which one is best? When we should do 'Eager' initialization or 'Lazy' initialization?
What are the pros and cons of them??
Printable View
Singleton design patterns can be designed either using 'Eager' or 'Lazy' initialization.
Which one is best? When we should do 'Eager' initialization or 'Lazy' initialization?
What are the pros and cons of them??